]>
git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/issue-21546.rs
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
21 #[allow(non_snake_case)]
23 //~^ NOTE previous definition of `Bar` here
27 //~^ ERROR a module named `Bar` has already been defined
32 //~^ NOTE previous definition
34 #[allow(non_snake_case)]
36 //~^ ERROR a type named `Baz` has already been defined
40 struct Qux { x: bool }
41 //~^ NOTE previous definition
43 #[allow(non_snake_case)]
45 //~^ ERROR a type named `Qux` has already been defined
50 //~^ NOTE previous definition
52 #[allow(non_snake_case)]
54 //~^ ERROR a type named `Quux` has already been defined
59 //~^ NOTE previous definition
61 #[allow(non_snake_case)]
63 //~^ ERROR a type named `Corge` has already been defined