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+
18//@ run-pass
29
310/* This test checks that nested comments are supported
411
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
715 */
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+ */
828*/
929
1030pub 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 ;
1136}
You can’t perform that action at this time.
0 commit comments