2018-10-20 17:23:29 -05:00
|
|
|
error: expected identifier, found keyword `self`
|
2018-11-27 03:56:36 -06:00
|
|
|
--> $DIR/import-self.rs:19:12
|
2018-10-20 17:23:29 -05:00
|
|
|
|
|
|
|
|
LL | use foo as self;
|
|
|
|
| ^^^^ expected identifier, found keyword
|
|
|
|
|
|
|
|
error[E0429]: `self` imports are only allowed within a { } list
|
2018-11-27 03:56:36 -06:00
|
|
|
--> $DIR/import-self.rs:22:5
|
2018-10-20 17:23:29 -05:00
|
|
|
|
|
|
|
|
LL | use foo::self;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0255]: the name `foo` is defined multiple times
|
|
|
|
--> $DIR/import-self.rs:16:11
|
|
|
|
|
|
|
|
|
LL | mod foo {
|
|
|
|
| ------- previous definition of the module `foo` here
|
|
|
|
...
|
|
|
|
LL | use foo::{self};
|
|
|
|
| ^^^^ `foo` reimported here
|
|
|
|
|
|
|
|
|
= note: `foo` must be defined only once in the type namespace of this module
|
|
|
|
help: you can use `as` to change the binding name of the import
|
|
|
|
|
|
|
|
|
LL | use foo::{self as other_foo};
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-11-24 19:25:59 -06:00
|
|
|
error[E0252]: the name `A` is defined multiple times
|
2018-11-27 03:56:36 -06:00
|
|
|
--> $DIR/import-self.rs:26:11
|
2018-11-24 19:25:59 -06:00
|
|
|
|
|
|
|
|
LL | use foo::A;
|
|
|
|
| ------ previous import of the type `A` here
|
|
|
|
LL | use foo::{self as A};
|
|
|
|
| ^^^^^^^^^ `A` reimported here
|
|
|
|
|
|
|
|
|
= note: `A` must be defined only once in the type namespace of this module
|
|
|
|
help: you can use `as` to change the binding name of the import
|
|
|
|
|
|
|
|
|
LL | use foo::{self as OtherA};
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2018-10-20 17:23:29 -05:00
|
|
|
|
2018-11-24 19:25:59 -06:00
|
|
|
Some errors occurred: E0252, E0255, E0429.
|
|
|
|
For more information about an error, try `rustc --explain E0252`.
|