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