File tree Expand file tree Collapse file tree 6 files changed +53
-4
lines changed Expand file tree Collapse file tree 6 files changed +53
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ mod m2 {
15
15
mod m3 {
16
16
mod empty { }
17
17
use empty:: issue_56125; //~ ERROR unresolved import `empty::issue_56125`
18
- use issue_56125:: * ;
18
+ use issue_56125:: * ; //~ ERROR `issue_56125` is ambiguous
19
19
}
20
20
21
21
fn main ( ) { }
Original file line number Diff line number Diff line change @@ -54,7 +54,24 @@ LL | use issue_56125::non_last_segment::non_last_segment::*;
54
54
= help: consider adding an explicit import of `issue_56125` to disambiguate
55
55
= help: or use `self::issue_56125` to refer to this module unambiguously
56
56
57
- error: aborting due to 3 previous errors
57
+ error[E0659]: `issue_56125` is ambiguous
58
+ --> $DIR/issue-56125.rs:18:9
59
+ |
60
+ LL | use issue_56125::*;
61
+ | ^^^^^^^^^^^ ambiguous name
62
+ |
63
+ = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
64
+ = note: `issue_56125` could refer to a crate passed with `--extern`
65
+ = help: use `::issue_56125` to refer to this crate unambiguously
66
+ note: `issue_56125` could also refer to the module imported here
67
+ --> $DIR/issue-56125.rs:18:9
68
+ |
69
+ LL | use issue_56125::*;
70
+ | ^^^^^^^^^^^^^^
71
+ = help: consider adding an explicit import of `issue_56125` to disambiguate
72
+ = help: or use `self::issue_56125` to refer to this module unambiguously
73
+
74
+ error: aborting due to 4 previous errors
58
75
59
76
Some errors have detailed explanations: E0432, E0659.
60
77
For more information about an error, try `rustc --explain E0432`.
Original file line number Diff line number Diff line change @@ -13,5 +13,7 @@ use a::*;
13
13
use e as b;
14
14
//~^ ERROR: unresolved import `e`
15
15
use b:: c:: D as e;
16
+ //~^ ERROR: cannot determine resolution for the import
17
+ //~| ERROR: cannot determine resolution for the import
16
18
17
19
fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: cannot determine resolution for the import
2
+ --> $DIR/shadow-glob-module-resolution-2.rs:15:5
3
+ |
4
+ LL | use b::c::D as e;
5
+ | ^^^^^^^^^^^^
6
+
7
+ error: cannot determine resolution for the import
8
+ --> $DIR/shadow-glob-module-resolution-2.rs:15:5
9
+ |
10
+ LL | use b::c::D as e;
11
+ | ^^^^^^^^^^^^
12
+ |
13
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
14
+
1
15
error[E0432]: unresolved import `e`
2
16
--> $DIR/shadow-glob-module-resolution-2.rs:13:5
3
17
|
@@ -7,6 +21,6 @@ LL | use e as b;
7
21
| no `e` in the root
8
22
| help: a similar name exists in the module: `a`
9
23
10
- error: aborting due to 1 previous error
24
+ error: aborting due to 3 previous errors
11
25
12
26
For more information about this error, try `rustc --explain E0432`.
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ use e as b;
12
12
13
13
use b:: C as e;
14
14
//~^ ERROR: unresolved import `b::C`
15
+ //~| ERROR: cannot determine resolution for the import
16
+ //~| ERROR: cannot determine resolution for the import
15
17
16
18
fn e ( ) { }
17
19
Original file line number Diff line number Diff line change
1
+ error: cannot determine resolution for the import
2
+ --> $DIR/shadow-glob-module-resolution-4.rs:13:5
3
+ |
4
+ LL | use b::C as e;
5
+ | ^^^^^^^^^
6
+
7
+ error: cannot determine resolution for the import
8
+ --> $DIR/shadow-glob-module-resolution-4.rs:13:5
9
+ |
10
+ LL | use b::C as e;
11
+ | ^^^^^^^^^
12
+ |
13
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
14
+
1
15
error[E0432]: unresolved import `b::C`
2
16
--> $DIR/shadow-glob-module-resolution-4.rs:13:5
3
17
|
4
18
LL | use b::C as e;
5
19
| ^^^^^^^^^
6
20
7
- error: aborting due to 1 previous error
21
+ error: aborting due to 3 previous errors
8
22
9
23
For more information about this error, try `rustc --explain E0432`.
You can’t perform that action at this time.
0 commit comments