]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-21546.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-21546.rs
1 // Also works as a test for #14564
2
3 #[allow(non_snake_case)]
4 mod Foo { }
5
6 #[allow(dead_code)]
7 struct Foo;
8 //~^ ERROR the name `Foo` is defined multiple times
9
10 #[allow(non_snake_case)]
11 mod Bar { }
12
13 #[allow(dead_code)]
14 struct Bar(i32);
15 //~^ ERROR the name `Bar` is defined multiple times
16
17
18 #[allow(dead_code)]
19 struct Baz(i32);
20
21 #[allow(non_snake_case)]
22 mod Baz { }
23 //~^ ERROR the name `Baz` is defined multiple times
24
25
26 #[allow(dead_code)]
27 struct Qux { x: bool }
28
29 #[allow(non_snake_case)]
30 mod Qux { }
31 //~^ ERROR the name `Qux` is defined multiple times
32
33
34 #[allow(dead_code)]
35 struct Quux;
36
37 #[allow(non_snake_case)]
38 mod Quux { }
39 //~^ ERROR the name `Quux` is defined multiple times
40
41
42 #[allow(dead_code)]
43 enum Corge { A, B }
44
45 #[allow(non_snake_case)]
46 mod Corge { }
47 //~^ ERROR the name `Corge` is defined multiple times
48
49 fn main() { }