blob: 8fe778963619cff3c6e9fd1b4a88fd834f731230 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
}
|