Skip to content

Commit bc863d6

Browse files
b-naberLorrensP-2158466
authored andcommitted
bless tests
1 parent 81134f5 commit bc863d6

14 files changed

+37
-74
lines changed

tests/ui/imports/ambiguous-17.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//@ check-pass
22
// https://github.com/rust-lang/rust/pull/113099#issuecomment-1638206152
33

4-
pub use evp::*; //~ WARNING ambiguous glob re-exports
4+
pub use evp::*;
5+
//~^ WARNING ambiguous glob re-exports
56
pub use handwritten::*;
67

78
macro_rules! m {

tests/ui/imports/ambiguous-17.stderr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ warning: ambiguous glob re-exports
33
|
44
LL | pub use evp::*;
55
| ^^^^^^ the name `id` in the value namespace is first re-exported here
6+
LL |
67
LL | pub use handwritten::*;
78
| -------------- but the name `id` in the value namespace is also re-exported here
89
|
910
= note: `#[warn(ambiguous_glob_reexports)]` on by default
1011

1112
warning: `id` is ambiguous
12-
--> $DIR/ambiguous-17.rs:26:5
13+
--> $DIR/ambiguous-17.rs:27:5
1314
|
1415
LL | id();
1516
| ^^ ambiguous name
@@ -24,7 +25,7 @@ LL | pub use evp::*;
2425
| ^^^^^^
2526
= help: consider adding an explicit import of `id` to disambiguate
2627
note: `id` could also refer to the function imported here
27-
--> $DIR/ambiguous-17.rs:5:9
28+
--> $DIR/ambiguous-17.rs:6:9
2829
|
2930
LL | pub use handwritten::*;
3031
| ^^^^^^^^^^^^^^

tests/ui/imports/ambiguous-4-extern.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33

44
macro_rules! m {
55
() => {
6-
pub fn id() {}
6+
pub fn id() {}
77
};
88
}
99

10-
pub use evp::*; //~ WARNING ambiguous glob re-exports
10+
pub use evp::*;
11+
//~^ WARNING ambiguous glob re-exports
1112
pub use handwritten::*;
1213

1314
mod evp {

tests/ui/imports/ambiguous-4-extern.stderr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ warning: ambiguous glob re-exports
33
|
44
LL | pub use evp::*;
55
| ^^^^^^ the name `id` in the value namespace is first re-exported here
6+
LL |
67
LL | pub use handwritten::*;
78
| -------------- but the name `id` in the value namespace is also re-exported here
89
|
910
= note: `#[warn(ambiguous_glob_reexports)]` on by default
1011

1112
warning: `id` is ambiguous
12-
--> $DIR/ambiguous-4-extern.rs:23:5
13+
--> $DIR/ambiguous-4-extern.rs:24:5
1314
|
1415
LL | id();
1516
| ^^ ambiguous name
@@ -24,7 +25,7 @@ LL | pub use evp::*;
2425
| ^^^^^^
2526
= help: consider adding an explicit import of `id` to disambiguate
2627
note: `id` could also refer to the function imported here
27-
--> $DIR/ambiguous-4-extern.rs:11:9
28+
--> $DIR/ambiguous-4-extern.rs:12:9
2829
|
2930
LL | pub use handwritten::*;
3031
| ^^^^^^^^^^^^^^

tests/ui/imports/ambiguous-9.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ pub mod dsl {
55
mod range {
66
pub fn date_range() {}
77
}
8-
pub use self::range::*; //~ WARNING ambiguous glob re-exports
8+
pub use self::range::*;
9+
//~^ WARNING ambiguous glob re-exports
910
use super::prelude::*;
1011
}
1112

1213
pub mod prelude {
1314
mod t {
1415
pub fn date_range() {}
1516
}
16-
pub use self::t::*; //~ WARNING ambiguous glob re-exports
17+
pub use self::t::*;
18+
//~^ WARNING ambiguous glob re-exports
1719
pub use super::dsl::*;
1820
}
1921

tests/ui/imports/ambiguous-9.stderr

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ warning: ambiguous glob re-exports
33
|
44
LL | pub use self::range::*;
55
| ^^^^^^^^^^^^^^ the name `date_range` in the value namespace is first re-exported here
6+
LL |
67
LL | use super::prelude::*;
78
| ----------------- but the name `date_range` in the value namespace is also re-exported here
89
|
910
= note: `#[warn(ambiguous_glob_reexports)]` on by default
1011

1112
warning: `date_range` is ambiguous
12-
--> $DIR/ambiguous-9.rs:24:5
13+
--> $DIR/ambiguous-9.rs:26:5
1314
|
1415
LL | date_range();
1516
| ^^^^^^^^^^ ambiguous name
@@ -24,23 +25,24 @@ LL | pub use self::range::*;
2425
| ^^^^^^^^^^^^^^
2526
= help: consider adding an explicit import of `date_range` to disambiguate
2627
note: `date_range` could also refer to the function imported here
27-
--> $DIR/ambiguous-9.rs:9:9
28+
--> $DIR/ambiguous-9.rs:10:9
2829
|
2930
LL | use super::prelude::*;
3031
| ^^^^^^^^^^^^^^^^^
3132
= help: consider adding an explicit import of `date_range` to disambiguate
3233
= note: `#[warn(ambiguous_glob_imports)]` on by default
3334

3435
warning: ambiguous glob re-exports
35-
--> $DIR/ambiguous-9.rs:16:13
36+
--> $DIR/ambiguous-9.rs:17:13
3637
|
3738
LL | pub use self::t::*;
3839
| ^^^^^^^^^^ the name `date_range` in the value namespace is first re-exported here
40+
LL |
3941
LL | pub use super::dsl::*;
4042
| ------------- but the name `date_range` in the value namespace is also re-exported here
4143

4244
warning: `date_range` is ambiguous
43-
--> $DIR/ambiguous-9.rs:24:5
45+
--> $DIR/ambiguous-9.rs:26:5
4446
|
4547
LL | date_range();
4648
| ^^^^^^^^^^ ambiguous name
@@ -49,13 +51,13 @@ LL | date_range();
4951
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
5052
= note: ambiguous because of multiple glob imports of a name in the same module
5153
note: `date_range` could refer to the function imported here
52-
--> $DIR/ambiguous-9.rs:20:5
54+
--> $DIR/ambiguous-9.rs:22:5
5355
|
5456
LL | use dsl::*;
5557
| ^^^^^^
5658
= help: consider adding an explicit import of `date_range` to disambiguate
5759
note: `date_range` could also refer to the function imported here
58-
--> $DIR/ambiguous-9.rs:21:5
60+
--> $DIR/ambiguous-9.rs:23:5
5961
|
6062
LL | use prelude::*;
6163
| ^^^^^^^^^^

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::*; //~ ERROR `issue_56125` is ambiguous
18+
use issue_56125::*;
1919
}
2020

2121
fn main() {}

tests/ui/imports/issue-56125.stderr

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,7 @@ 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[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
57+
error: aborting due to 3 previous errors
7558

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ 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
1816

1917
fn main() { }
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
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-
151
error[E0432]: unresolved import `e`
162
--> $DIR/shadow-glob-module-resolution-2.rs:13:5
173
|
@@ -21,6 +7,6 @@ LL | use e as b;
217
| no `e` in the root
228
| help: a similar name exists in the module: `a`
239

24-
error: aborting due to 3 previous errors
10+
error: aborting due to 1 previous error
2511

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

0 commit comments

Comments
 (0)