]> git.proxmox.com Git - rustc.git/blob - src/test/ui/imports/issue-45829/import-self.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / imports / 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:8
9 |
10 LL | use foo::self;
11 | ^^^^^^
12 |
13 help: consider importing the module directly
14 |
15 LL - use foo::self;
16 LL + use foo;
17 |
18 help: alternatively, use the multi-path `use` syntax to import `self`
19 |
20 LL | use foo::{self};
21 | + +
22
23 error[E0255]: the name `foo` is defined multiple times
24 --> $DIR/import-self.rs:6:11
25 |
26 LL | mod foo {
27 | ------- previous definition of the module `foo` here
28 ...
29 LL | use foo::{self};
30 | ^^^^ `foo` reimported here
31 |
32 = note: `foo` must be defined only once in the type namespace of this module
33 help: you can use `as` to change the binding name of the import
34 |
35 LL | use foo::{self as other_foo};
36 | ~~~~~~~~~~~~~~~~~
37
38 error[E0255]: the name `foo` is defined multiple times
39 --> $DIR/import-self.rs:12:5
40 |
41 LL | mod foo {
42 | ------- previous definition of the module `foo` here
43 ...
44 LL | use foo::self;
45 | ^^^^^^^^^ `foo` reimported here
46 |
47 = note: `foo` must be defined only once in the type namespace of this module
48 help: you can use `as` to change the binding name of the import
49 |
50 LL | use foo as other_foo;
51 | ~~~~~~~~~~~~~~~~
52
53 error[E0252]: the name `A` is defined multiple times
54 --> $DIR/import-self.rs:16:11
55 |
56 LL | use foo::A;
57 | ------ previous import of the type `A` here
58 LL | 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
62 help: you can use `as` to change the binding name of the import
63 |
64 LL | use foo::{self as OtherA};
65 | ~~~~~~~~~~~~~~
66
67 error: aborting due to 5 previous errors
68
69 Some errors have detailed explanations: E0252, E0255, E0429.
70 For more information about an error, try `rustc --explain E0252`.