rust/src/test/ui/imports/duplicate.stderr

89 lines
2.5 KiB
Plaintext
Raw Normal View History

error[E0252]: the name `foo` is defined multiple times
--> $DIR/duplicate.rs:25:9
|
24 | use a::foo;
| ------ previous import of the value `foo` here
25 | use a::foo; //~ ERROR the name `foo` is defined multiple times
| ^^^^^^ `foo` reimported here
|
= note: `foo` must be defined only once in the value namespace of this module
help: You can use `as` to change the binding name of the import
|
25 | use a::foo as Otherfoo; //~ ERROR the name `foo` is defined multiple times
| ^^^^^^^^^^^^^^^^^^
2018-01-17 00:00:17 +01:00
error[E0659]: `foo` is ambiguous
--> $DIR/duplicate.rs:56:9
|
56 | use self::foo::bar; //~ ERROR `foo` is ambiguous
| ^^^^^^^^^^^^^^
|
note: `foo` could refer to the name imported here
--> $DIR/duplicate.rs:53:9
|
53 | use self::m1::*;
| ^^^^^^^^^^^
note: `foo` could also refer to the name imported here
--> $DIR/duplicate.rs:54:9
|
54 | use self::m2::*;
| ^^^^^^^^^^^
= note: consider adding an explicit import of `foo` to disambiguate
2018-01-17 00:00:17 +01:00
error[E0659]: `foo` is ambiguous
--> $DIR/duplicate.rs:45:5
|
45 | f::foo(); //~ ERROR `foo` is ambiguous
| ^^^^^^
|
note: `foo` could refer to the name imported here
--> $DIR/duplicate.rs:34:13
|
34 | pub use a::*;
| ^^^^
note: `foo` could also refer to the name imported here
--> $DIR/duplicate.rs:35:13
|
35 | pub use b::*;
| ^^^^
= note: consider adding an explicit import of `foo` to disambiguate
2018-01-17 00:00:17 +01:00
error[E0659]: `foo` is ambiguous
--> $DIR/duplicate.rs:46:5
|
46 | g::foo(); //~ ERROR `foo` is ambiguous
| ^^^^^^
|
note: `foo` could refer to the name imported here
--> $DIR/duplicate.rs:39:13
|
39 | pub use a::*;
| ^^^^
note: `foo` could also refer to the name imported here
--> $DIR/duplicate.rs:40:13
|
40 | pub use f::*;
| ^^^^
= note: consider adding an explicit import of `foo` to disambiguate
2018-01-17 00:00:17 +01:00
error[E0659]: `foo` is ambiguous
--> $DIR/duplicate.rs:59:9
|
59 | foo::bar(); //~ ERROR `foo` is ambiguous
| ^^^^^^^^
|
note: `foo` could refer to the name imported here
--> $DIR/duplicate.rs:53:9
|
53 | use self::m1::*;
| ^^^^^^^^^^^
note: `foo` could also refer to the name imported here
--> $DIR/duplicate.rs:54:9
|
54 | use self::m2::*;
| ^^^^^^^^^^^
= note: consider adding an explicit import of `foo` to disambiguate
error: aborting due to 5 previous errors