1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Also works as a test for #14564
13 #[allow(non_snake_case)]
15 //~^ NOTE previous definition of `Foo` here
19 //~^ ERROR a module named `Foo` has already been defined in this module
20 //~| NOTE already defined
22 #[allow(non_snake_case)]
24 //~^ NOTE previous definition of `Bar` here
28 //~^ ERROR a module named `Bar` has already been defined
29 //~| NOTE already defined
34 //~^ NOTE previous definition
36 #[allow(non_snake_case)]
38 //~^ ERROR a type named `Baz` has already been defined
39 //~| NOTE already defined
43 struct Qux { x: bool }
44 //~^ NOTE previous definition
46 #[allow(non_snake_case)]
48 //~^ ERROR a type named `Qux` has already been defined
49 //~| NOTE already defined
54 //~^ NOTE previous definition
56 #[allow(non_snake_case)]
58 //~^ ERROR a type named `Quux` has already been defined
59 //~| NOTE already defined
64 //~^ NOTE previous definition
66 #[allow(non_snake_case)]
68 //~^ ERROR a type named `Corge` has already been defined
69 //~| NOTE already defined