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 {
1515mod m3 {
1616 mod empty { }
1717 use empty:: issue_56125; //~ ERROR unresolved import `empty::issue_56125`
18- use issue_56125:: * ;
18+ use issue_56125:: * ; //~ ERROR `issue_56125` is ambiguous
1919}
2020
2121fn 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::*;
5454 = help: consider adding an explicit import of `issue_56125` to disambiguate
5555 = help: or use `self::issue_56125` to refer to this module unambiguously
5656
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
5875
5976Some errors have detailed explanations: E0432, E0659.
6077For 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::*;
1313use e as b;
1414//~^ ERROR: unresolved import `e`
1515use b:: c:: D as e;
16+ //~^ ERROR: cannot determine resolution for the import
17+ //~| ERROR: cannot determine resolution for the import
1618
1719fn 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+
115error[E0432]: unresolved import `e`
216 --> $DIR/shadow-glob-module-resolution-2.rs:13:5
317 |
@@ -7,6 +21,6 @@ LL | use e as b;
721 | no `e` in the root
822 | help: a similar name exists in the module: `a`
923
10- error: aborting due to 1 previous error
24+ error: aborting due to 3 previous errors
1125
1226For 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;
1212
1313use b:: C as e;
1414//~^ ERROR: unresolved import `b::C`
15+ //~| ERROR: cannot determine resolution for the import
16+ //~| ERROR: cannot determine resolution for the import
1517
1618fn e ( ) { }
1719
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+
115error[E0432]: unresolved import `b::C`
216 --> $DIR/shadow-glob-module-resolution-4.rs:13:5
317 |
418LL | use b::C as e;
519 | ^^^^^^^^^
620
7- error: aborting due to 1 previous error
21+ error: aborting due to 3 previous errors
822
923For more information about this error, try `rustc --explain E0432`.
You can’t perform that action at this time.
0 commit comments