2015-10-22 19:53:01 +00:00
|
|
|
// Also works as a test for #14564
|
|
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
mod Foo { }
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
struct Foo;
|
2017-05-18 03:29:58 +00:00
|
|
|
//~^ ERROR the name `Foo` is defined multiple times
|
2015-10-22 19:53:01 +00:00
|
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
mod Bar { }
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
struct Bar(i32);
|
2017-05-18 03:29:58 +00:00
|
|
|
//~^ ERROR the name `Bar` is defined multiple times
|
2015-10-22 19:53:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
struct Baz(i32);
|
|
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
mod Baz { }
|
2017-05-18 03:29:58 +00:00
|
|
|
//~^ ERROR the name `Baz` is defined multiple times
|
2015-10-22 19:53:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
struct Qux { x: bool }
|
|
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
mod Qux { }
|
2017-05-18 03:29:58 +00:00
|
|
|
//~^ ERROR the name `Qux` is defined multiple times
|
2015-10-22 19:53:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
struct Quux;
|
|
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
mod Quux { }
|
2017-05-18 03:29:58 +00:00
|
|
|
//~^ ERROR the name `Quux` is defined multiple times
|
2015-10-22 19:53:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
enum Corge { A, B }
|
|
|
|
|
|
|
|
#[allow(non_snake_case)]
|
|
|
|
mod Corge { }
|
2017-05-18 03:29:58 +00:00
|
|
|
//~^ ERROR the name `Corge` is defined multiple times
|
2015-10-22 19:53:01 +00:00
|
|
|
|
|
|
|
fn main() { }
|