diff options
| author | Jubilee <workingjubilee@gmail.com> | 2025-07-04 23:26:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-04 23:26:21 -0700 |
| commit | f10725218dbc9fabd1073ed3d29a0cbed17cfc00 (patch) | |
| tree | 8629d4e1ea5ad34aa487b3979893fc24882dcac1 /tests/ui/parser | |
| parent | 2f119daf4eb26fe73d8e5e651769977484f67328 (diff) | |
| parent | f12120d2bd237ffbf03c8de027513a8d0bc63616 (diff) | |
| download | rust-f10725218dbc9fabd1073ed3d29a0cbed17cfc00.tar.gz rust-f10725218dbc9fabd1073ed3d29a0cbed17cfc00.zip | |
Rollup merge of #143202 - Kivooeo:tf18, r=tgross35
`tests/ui`: A New Order [18/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
Diffstat (limited to 'tests/ui/parser')
| -rw-r--r-- | tests/ui/parser/nested-block-comments.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/ui/parser/nested-block-comments.rs b/tests/ui/parser/nested-block-comments.rs new file mode 100644 index 00000000000..8fe77896361 --- /dev/null +++ b/tests/ui/parser/nested-block-comments.rs @@ -0,0 +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 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; +} |
