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.
24 use a
::foo
; //~ NOTE previous import
25 use a
::foo
; //~ ERROR `foo` has already been imported
26 //~| NOTE already imported
35 pub use a
::*; //~ NOTE `foo` could resolve to the name imported here
36 pub use b
::*; //~ NOTE `foo` could also resolve to the name imported here
40 pub use a
::*; //~ NOTE `foo` could resolve to the name imported here
41 pub use f
::*; //~ NOTE `foo` could also resolve to the name imported here
46 f
::foo(); //~ ERROR `foo` is ambiguous
47 //~| NOTE consider adding an explicit import of `foo` to disambiguate
48 g
::foo(); //~ ERROR `foo` is ambiguous
49 //~| NOTE consider adding an explicit import of `foo` to disambiguate
52 mod ambiguous_module_errors
{
53 pub mod m1 { pub use super::m1 as foo; }
54 pub mod m2 { pub use super::m2 as foo; }
56 use self::m1
::*; //~ NOTE
58 use self::m2
::*; //~ NOTE
61 use self::foo
::bar
; //~ ERROR `foo` is ambiguous
65 foo
::bar(); //~ ERROR `foo` is ambiguous