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

95 lines
3.1 KiB
Plaintext
Raw Normal View History

error[E0252]: the name `foo` is defined multiple times
--> $DIR/duplicate.rs:25:9
|
2018-02-22 18:42:32 -06:00
LL | use a::foo;
| ------ previous import of the value `foo` here
2018-02-22 18:42:32 -06:00
LL | 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
|
2018-02-24 17:01:39 -06:00
LL | use a::foo as other_foo; //~ ERROR the name `foo` is defined multiple times
| ^^^^^^^^^^^^^^^^^^^
error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module)
--> $DIR/duplicate.rs:56:15
|
2018-02-22 18:42:32 -06:00
LL | use self::foo::bar; //~ ERROR `foo` is ambiguous
| ^^^ ambiguous name
|
note: `foo` could refer to the module imported here
--> $DIR/duplicate.rs:53:9
|
2018-02-22 18:42:32 -06:00
LL | use self::m1::*;
| ^^^^^^^^^^^
= help: consider adding an explicit import of `foo` to disambiguate
note: `foo` could also refer to the module imported here
--> $DIR/duplicate.rs:54:9
|
2018-02-22 18:42:32 -06:00
LL | use self::m2::*;
| ^^^^^^^^^^^
= help: consider adding an explicit import of `foo` to disambiguate
error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module)
--> $DIR/duplicate.rs:45:8
|
2018-02-22 18:42:32 -06:00
LL | f::foo(); //~ ERROR `foo` is ambiguous
| ^^^ ambiguous name
|
note: `foo` could refer to the function imported here
--> $DIR/duplicate.rs:34:13
|
2018-02-22 18:42:32 -06:00
LL | pub use a::*;
| ^^^^
= help: consider adding an explicit import of `foo` to disambiguate
note: `foo` could also refer to the function imported here
--> $DIR/duplicate.rs:35:13
|
2018-02-22 18:42:32 -06:00
LL | pub use b::*;
| ^^^^
= help: consider adding an explicit import of `foo` to disambiguate
error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module)
--> $DIR/duplicate.rs:46:8
|
2018-02-22 18:42:32 -06:00
LL | g::foo(); //~ ERROR `foo` is ambiguous
| ^^^ ambiguous name
|
note: `foo` could refer to the function imported here
--> $DIR/duplicate.rs:39:13
|
2018-02-22 18:42:32 -06:00
LL | pub use a::*;
| ^^^^
= help: consider adding an explicit import of `foo` to disambiguate
note: `foo` could also refer to the unresolved item imported here
--> $DIR/duplicate.rs:40:13
|
2018-02-22 18:42:32 -06:00
LL | pub use f::*;
| ^^^^
= help: consider adding an explicit import of `foo` to disambiguate
error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module)
--> $DIR/duplicate.rs:59:9
|
2018-02-22 18:42:32 -06:00
LL | foo::bar(); //~ ERROR `foo` is ambiguous
| ^^^ ambiguous name
|
note: `foo` could refer to the module imported here
--> $DIR/duplicate.rs:53:9
|
2018-02-22 18:42:32 -06:00
LL | use self::m1::*;
| ^^^^^^^^^^^
= help: consider adding an explicit import of `foo` to disambiguate
note: `foo` could also refer to the module imported here
--> $DIR/duplicate.rs:54:9
|
2018-02-22 18:42:32 -06:00
LL | use self::m2::*;
| ^^^^^^^^^^^
= help: consider adding an explicit import of `foo` to disambiguate
error: aborting due to 5 previous errors
2018-03-03 08:59:40 -06:00
Some errors occurred: E0252, E0659.
For more information about an error, try `rustc --explain E0252`.