File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change
1
+ //! Test that nested block comments are properly supported by the parser.
2
+ //!
3
+ //! This is a historical test from the early days of Rust development when
4
+ //! multi-line comment support was first implemented.
5
+ //!
6
+ //! See <https://github.com/rust-lang/rust/issues/66>.
7
+
1
8
//@ run-pass
2
9
3
10
/* This test checks that nested comments are supported
4
11
5
- /*
6
- This should not panic
12
+ /* This is a nested comment
13
+ /* And this is even more deeply nested */
14
+ Back to the first level of nesting
7
15
*/
16
+
17
+ /* Another nested comment at the same level */
18
+ */
19
+
20
+ /* Additional test cases for nested comments */
21
+
22
+ /*
23
+ /* Level 1
24
+ /* Level 2
25
+ /* Level 3 */
26
+ */
27
+ */
8
28
*/
9
29
10
30
pub fn main ( ) {
31
+ // Check that code after nested comments works correctly
32
+ let _x = 42 ;
33
+
34
+ /* Even inline /* nested */ comments work */
35
+ let _y = /* nested /* comment */ test */ 100 ;
11
36
}
You can’t perform that action at this time.
0 commit comments