summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorKivooeo <Kivooeo123@gmail.com>2025-06-29 21:05:19 +0500
committerKivooeo <Kivooeo123@gmail.com>2025-07-01 15:29:29 +0500
commitf12120d2bd237ffbf03c8de027513a8d0bc63616 (patch)
tree3350a7cbd9079d31f145865734ed4de151c91133 /tests/ui/parser
parent6ca9b43ea9f50d5e77dc0f8d4d62283017b3f1b0 (diff)
downloadrust-f12120d2bd237ffbf03c8de027513a8d0bc63616.tar.gz
rust-f12120d2bd237ffbf03c8de027513a8d0bc63616.zip
cleaned up some tests
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/nested-block-comments.rs27
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/ui/parser/nested-block-comments.rs b/tests/ui/parser/nested-block-comments.rs
index 008df27e0e2..8fe77896361 100644
--- a/tests/ui/parser/nested-block-comments.rs
+++ b/tests/ui/parser/nested-block-comments.rs
@@ -1,11 +1,34 @@
+//! Test that nested block comments are properly supported by the parser.
+//!
+//! See <https://github.com/rust-lang/rust/issues/66>.
+
 //@ run-pass
 
 /* This test checks that nested comments are supported
 
-   /*
-     This should not panic
+   /* This is a nested comment
+      /* And this is even more deeply nested */
+      Back to the first level of nesting
    */
+
+   /* Another nested comment at the same level */
+*/
+
+/* Additional test cases for nested comments */
+
+#[rustfmt::skip]
+/*
+    /* Level 1
+        /* Level 2
+            /* Level 3 */
+         */
+    */
 */
 
 pub fn main() {
+    // Check that code after nested comments works correctly
+    let _x = 42;
+
+    /* Even inline /* nested */ comments work */
+    let _y = /* nested /* comment */ test */ 100;
 }