]>
Commit | Line | Data |
---|---|---|
b039eaaf SL |
1 | // Also works as a test for #14564 |
2 | ||
3 | #[allow(non_snake_case)] | |
4 | mod Foo { } | |
b039eaaf SL |
5 | |
6 | #[allow(dead_code)] | |
7 | struct Foo; | |
041b39d2 | 8 | //~^ ERROR the name `Foo` is defined multiple times |
b039eaaf SL |
9 | |
10 | #[allow(non_snake_case)] | |
11 | mod Bar { } | |
b039eaaf SL |
12 | |
13 | #[allow(dead_code)] | |
14 | struct Bar(i32); | |
041b39d2 | 15 | //~^ ERROR the name `Bar` is defined multiple times |
b039eaaf SL |
16 | |
17 | ||
18 | #[allow(dead_code)] | |
19 | struct Baz(i32); | |
b039eaaf SL |
20 | |
21 | #[allow(non_snake_case)] | |
22 | mod Baz { } | |
041b39d2 | 23 | //~^ ERROR the name `Baz` is defined multiple times |
b039eaaf SL |
24 | |
25 | ||
26 | #[allow(dead_code)] | |
27 | struct Qux { x: bool } | |
b039eaaf SL |
28 | |
29 | #[allow(non_snake_case)] | |
30 | mod Qux { } | |
041b39d2 | 31 | //~^ ERROR the name `Qux` is defined multiple times |
b039eaaf SL |
32 | |
33 | ||
34 | #[allow(dead_code)] | |
35 | struct Quux; | |
b039eaaf SL |
36 | |
37 | #[allow(non_snake_case)] | |
38 | mod Quux { } | |
041b39d2 | 39 | //~^ ERROR the name `Quux` is defined multiple times |
b039eaaf SL |
40 | |
41 | ||
42 | #[allow(dead_code)] | |
43 | enum Corge { A, B } | |
44 | ||
45 | #[allow(non_snake_case)] | |
46 | mod Corge { } | |
041b39d2 | 47 | //~^ ERROR the name `Corge` is defined multiple times |
b039eaaf SL |
48 | |
49 | fn main() { } |