Skip to content

Commit 6a32db1

Browse files
committed
Added 4654 test case
1 parent 01fdd5d commit 6a32db1

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

tests/source/issue-4654.rs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
struct Foo {
2+
bar: ()
3+
// Comment
4+
}
5+
6+
struct Bar {
7+
baz: ()
8+
/*
9+
Comment
10+
*/
11+
}
12+
13+
struct Baz(
14+
()
15+
// Comment
16+
);
17+
18+
fn main() {
19+
let _ = Foo {
20+
bar: ()
21+
// Comment
22+
};
23+
24+
let _ = Bar {
25+
baz: ()
26+
/*
27+
Comment
28+
*/
29+
};
30+
31+
let _ = Baz(
32+
()
33+
34+
// Comment
35+
);
36+
37+
match a {
38+
0 => {}
39+
// Foo
40+
1 => {} // Bar
41+
// Baz
42+
2 => {}
43+
// Qux
44+
}
45+
}

tests/target/issue-4654.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
struct Foo {
2+
bar: (),
3+
// Comment
4+
}
5+
6+
struct Bar {
7+
baz: (),
8+
/*
9+
Comment
10+
*/
11+
}
12+
13+
struct Baz(
14+
(),
15+
// Comment
16+
);
17+
18+
fn main() {
19+
let _ = Foo {
20+
bar: (),
21+
// Comment
22+
};
23+
24+
let _ = Bar {
25+
baz: (),
26+
/*
27+
Comment
28+
*/
29+
};
30+
31+
let _ = Baz(
32+
(),
33+
// Comment
34+
);
35+
36+
match a {
37+
0 => {}
38+
// Foo
39+
1 => {} // Bar
40+
// Baz
41+
2 => {}
42+
// Qux
43+
}
44+
}

0 commit comments

Comments
 (0)