1 // Copyright 2016 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.
25 use a::foo; //~ ERROR the name `foo` is defined multiple times
45 f::foo(); //~ ERROR `foo` is ambiguous
46 g::foo(); //~ ERROR `foo` is ambiguous
49 mod ambiguous_module_errors {
50 pub mod m1 { pub use super::m1 as foo; }
51 pub mod m2 { pub use super::m2 as foo; }
56 use self::foo::bar; //~ ERROR `foo` is ambiguous
59 foo::bar(); //~ ERROR `foo` is ambiguous