Skip to content

Commit dd5c2bb

Browse files
revert tests
1 parent 9cabf99 commit dd5c2bb

6 files changed

+53
-4
lines changed

tests/ui/imports/issue-56125.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod m2 {
1515
mod 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

2121
fn main() {}

tests/ui/imports/issue-56125.stderr

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff 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

5976
Some errors have detailed explanations: E0432, E0659.
6077
For more information about an error, try `rustc --explain E0432`.

tests/ui/imports/shadow-glob-module-resolution-2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ use a::*;
1313
use e as b;
1414
//~^ ERROR: unresolved import `e`
1515
use b::c::D as e;
16+
//~^ ERROR: cannot determine resolution for the import
17+
//~| ERROR: cannot determine resolution for the import
1618

1719
fn main() { }

tests/ui/imports/shadow-glob-module-resolution-2.stderr

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
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+
115
error[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

1226
For more information about this error, try `rustc --explain E0432`.

tests/ui/imports/shadow-glob-module-resolution-4.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use e as b;
1212

1313
use 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

1618
fn e() {}
1719

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
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+
115
error[E0432]: unresolved import `b::C`
216
--> $DIR/shadow-glob-module-resolution-4.rs:13:5
317
|
418
LL | use b::C as e;
519
| ^^^^^^^^^
620

7-
error: aborting due to 1 previous error
21+
error: aborting due to 3 previous errors
822

923
For more information about this error, try `rustc --explain E0432`.

0 commit comments

Comments
 (0)