]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-45829/import-self.stderr
Rollup merge of #60492 - acrrd:issues/54054_chain, r=SimonSapin
[rust.git] / src / test / ui / issues / issue-45829 / import-self.stderr
1 error: expected identifier, found keyword `self`
2   --> $DIR/import-self.rs:9:12
3    |
4 LL | use foo as self;
5    |            ^^^^ expected identifier, found keyword
6
7 error[E0429]: `self` imports are only allowed within a { } list
8   --> $DIR/import-self.rs:12:5
9    |
10 LL | use foo::self;
11    |     ^^^^^^^^^
12
13 error[E0255]: the name `foo` is defined multiple times
14   --> $DIR/import-self.rs:6:11
15    |
16 LL | mod foo {
17    | ------- previous definition of the module `foo` here
18 ...
19 LL | use foo::{self};
20    |           ^^^^ `foo` reimported here
21    |
22    = note: `foo` must be defined only once in the type namespace of this module
23 help: you can use `as` to change the binding name of the import
24    |
25 LL | use foo::{self as other_foo};
26    |           ^^^^^^^^^^^^^^^^^
27
28 error[E0252]: the name `A` is defined multiple times
29   --> $DIR/import-self.rs:16:11
30    |
31 LL | use foo::A;
32    |     ------ previous import of the type `A` here
33 LL | use foo::{self as A};
34    |           ^^^^^^^^^ `A` reimported here
35    |
36    = note: `A` must be defined only once in the type namespace of this module
37 help: you can use `as` to change the binding name of the import
38    |
39 LL | use foo::{self as OtherA};
40    |           ^^^^^^^^^^^^^^
41
42 error: aborting due to 4 previous errors
43
44 Some errors have detailed explanations: E0252, E0255, E0429.
45 For more information about an error, try `rustc --explain E0252`.