fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: expected identifier, found keyword `self` 2 --> $DIR/import-self.rs:9:12 3 | 4LL | use foo as self; 5 | ^^^^ expected identifier, found keyword 6 7error[E0429]: `self` imports are only allowed within a { } list 8 --> $DIR/import-self.rs:12:8 9 | 10LL | use foo::self; 11 | ^^^^^^ 12 | 13help: consider importing the module directly 14 | 15LL - use foo::self; 16LL + use foo; 17 | 18help: alternatively, use the multi-path `use` syntax to import `self` 19 | 20LL | use foo::{self}; 21 | + + 22 23error[E0255]: the name `foo` is defined multiple times 24 --> $DIR/import-self.rs:6:11 25 | 26LL | mod foo { 27 | ------- previous definition of the module `foo` here 28... 29LL | use foo::{self}; 30 | ^^^^ `foo` reimported here 31 | 32 = note: `foo` must be defined only once in the type namespace of this module 33help: you can use `as` to change the binding name of the import 34 | 35LL | use foo::{self as other_foo}; 36 | ~~~~~~~~~~~~~~~~~ 37 38error[E0255]: the name `foo` is defined multiple times 39 --> $DIR/import-self.rs:12:5 40 | 41LL | mod foo { 42 | ------- previous definition of the module `foo` here 43... 44LL | use foo::self; 45 | ^^^^^^^^^ `foo` reimported here 46 | 47 = note: `foo` must be defined only once in the type namespace of this module 48help: you can use `as` to change the binding name of the import 49 | 50LL | use foo as other_foo; 51 | ~~~~~~~~~~~~~~~~ 52 53error[E0252]: the name `A` is defined multiple times 54 --> $DIR/import-self.rs:16:11 55 | 56LL | use foo::A; 57 | ------ previous import of the type `A` here 58LL | use foo::{self as A}; 59 | ^^^^^^^^^ `A` reimported here 60 | 61 = note: `A` must be defined only once in the type namespace of this module 62help: you can use `as` to change the binding name of the import 63 | 64LL | use foo::{self as OtherA}; 65 | ~~~~~~~~~~~~~~ 66 67error: aborting due to 5 previous errors 68 69Some errors have detailed explanations: E0252, E0255, E0429. 70For more information about an error, try `rustc --explain E0252`.