Skip to content

Commit fba99fc

Browse files
bless tests
1 parent e17c41e commit fba99fc

8 files changed

+42
-30
lines changed

tests/ui/imports/ambiguous-17.rs

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

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

67
macro_rules! m {

tests/ui/imports/ambiguous-17.stderr

Lines changed: 5 additions & 4 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
error: `id` is ambiguous
12-
--> $DIR/ambiguous-17.rs:25:5
13+
--> $DIR/ambiguous-17.rs:26: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:4:9
28+
--> $DIR/ambiguous-17.rs:5:9
2829
|
2930
LL | pub use handwritten::*;
3031
| ^^^^^^^^^^^^^^
@@ -35,7 +36,7 @@ error: aborting due to 1 previous error; 1 warning emitted
3536

3637
Future incompatibility report: Future breakage diagnostic:
3738
error: `id` is ambiguous
38-
--> $DIR/ambiguous-17.rs:25:5
39+
--> $DIR/ambiguous-17.rs:26:5
3940
|
4041
LL | id();
4142
| ^^ ambiguous name
@@ -50,7 +51,7 @@ LL | pub use evp::*;
5051
| ^^^^^^
5152
= help: consider adding an explicit import of `id` to disambiguate
5253
note: `id` could also refer to the function imported here
53-
--> $DIR/ambiguous-17.rs:4:9
54+
--> $DIR/ambiguous-17.rs:5:9
5455
|
5556
LL | pub use handwritten::*;
5657
| ^^^^^^^^^^^^^^

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

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

66
macro_rules! m {
77
() => {
8-
pub fn id() {}
8+
pub fn id() {}
99
};
1010
}
1111

12-
pub use evp::*; //~ WARNING ambiguous glob re-exports
12+
pub use evp::*;
13+
//~^ WARNING ambiguous glob re-exports
1314
pub use handwritten::*;
1415

1516
mod evp {

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

Lines changed: 5 additions & 4 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:25:5
13+
--> $DIR/ambiguous-4-extern.rs:26: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:13:9
28+
--> $DIR/ambiguous-4-extern.rs:14:9
2829
|
2930
LL | pub use handwritten::*;
3031
| ^^^^^^^^^^^^^^
@@ -39,7 +40,7 @@ warning: 2 warnings emitted
3940

4041
Future incompatibility report: Future breakage diagnostic:
4142
warning: `id` is ambiguous
42-
--> $DIR/ambiguous-4-extern.rs:25:5
43+
--> $DIR/ambiguous-4-extern.rs:26:5
4344
|
4445
LL | id();
4546
| ^^ ambiguous name
@@ -54,7 +55,7 @@ LL | pub use evp::*;
5455
| ^^^^^^
5556
= help: consider adding an explicit import of `id` to disambiguate
5657
note: `id` could also refer to the function imported here
57-
--> $DIR/ambiguous-4-extern.rs:13:9
58+
--> $DIR/ambiguous-4-extern.rs:14:9
5859
|
5960
LL | pub use handwritten::*;
6061
| ^^^^^^^^^^^^^^

tests/ui/imports/ambiguous-9.rs

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

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

tests/ui/imports/ambiguous-9.stderr

Lines changed: 13 additions & 11 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
error: `date_range` is ambiguous
12-
--> $DIR/ambiguous-9.rs:23:5
13+
--> $DIR/ambiguous-9.rs:25: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:8:9
28+
--> $DIR/ambiguous-9.rs:9:9
2829
|
2930
LL | use super::prelude::*;
3031
| ^^^^^^^^^^^^^^^^^
3132
= help: consider adding an explicit import of `date_range` to disambiguate
3233
= note: `#[deny(ambiguous_glob_imports)]` on by default
3334

3435
warning: ambiguous glob re-exports
35-
--> $DIR/ambiguous-9.rs:15:13
36+
--> $DIR/ambiguous-9.rs:16: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
error: `date_range` is ambiguous
43-
--> $DIR/ambiguous-9.rs:23:5
45+
--> $DIR/ambiguous-9.rs:25: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:19:5
54+
--> $DIR/ambiguous-9.rs:21: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:20:5
60+
--> $DIR/ambiguous-9.rs:22:5
5961
|
6062
LL | use prelude::*;
6163
| ^^^^^^^^^^
@@ -65,7 +67,7 @@ error: aborting due to 2 previous errors; 2 warnings emitted
6567

6668
Future incompatibility report: Future breakage diagnostic:
6769
error: `date_range` is ambiguous
68-
--> $DIR/ambiguous-9.rs:23:5
70+
--> $DIR/ambiguous-9.rs:25:5
6971
|
7072
LL | date_range();
7173
| ^^^^^^^^^^ ambiguous name
@@ -80,7 +82,7 @@ LL | pub use self::range::*;
8082
| ^^^^^^^^^^^^^^
8183
= help: consider adding an explicit import of `date_range` to disambiguate
8284
note: `date_range` could also refer to the function imported here
83-
--> $DIR/ambiguous-9.rs:8:9
85+
--> $DIR/ambiguous-9.rs:9:9
8486
|
8587
LL | use super::prelude::*;
8688
| ^^^^^^^^^^^^^^^^^
@@ -89,7 +91,7 @@ LL | use super::prelude::*;
8991

9092
Future breakage diagnostic:
9193
error: `date_range` is ambiguous
92-
--> $DIR/ambiguous-9.rs:23:5
94+
--> $DIR/ambiguous-9.rs:25:5
9395
|
9496
LL | date_range();
9597
| ^^^^^^^^^^ ambiguous name
@@ -98,13 +100,13 @@ LL | date_range();
98100
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
99101
= note: ambiguous because of multiple glob imports of a name in the same module
100102
note: `date_range` could refer to the function imported here
101-
--> $DIR/ambiguous-9.rs:19:5
103+
--> $DIR/ambiguous-9.rs:21:5
102104
|
103105
LL | use dsl::*;
104106
| ^^^^^^
105107
= help: consider adding an explicit import of `date_range` to disambiguate
106108
note: `date_range` could also refer to the function imported here
107-
--> $DIR/ambiguous-9.rs:20:5
109+
--> $DIR/ambiguous-9.rs:22:5
108110
|
109111
LL | use prelude::*;
110112
| ^^^^^^^^^^

tests/ui/resolve/issue-107563-ambiguous-glob-reexports.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ pub use foo::*;
1414
pub use bar::*;
1515

1616
mod ambiguous {
17-
mod m1 { pub type A = u8; }
18-
mod m2 { pub type A = u8; }
17+
mod m1 {
18+
pub type A = u8;
19+
}
20+
mod m2 {
21+
pub type A = u8;
22+
}
1923
pub use self::m1::*;
2024
//~^ ERROR ambiguous glob re-exports
2125
pub use self::m2::*;

tests/ui/resolve/issue-107563-ambiguous-glob-reexports.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
error[E0659]: `A` is ambiguous
2-
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:25:24
2+
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:29:24
33
|
44
LL | pub use ambiguous::A;
55
| ^ ambiguous name
66
|
77
= note: ambiguous because of multiple glob imports of a name in the same module
88
note: `A` could refer to the type alias imported here
9-
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:19:13
9+
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:23:13
1010
|
1111
LL | pub use self::m1::*;
1212
| ^^^^^^^^^^^
1313
= help: consider adding an explicit import of `A` to disambiguate
1414
note: `A` could also refer to the type alias imported here
15-
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:21:13
15+
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:25:13
1616
|
1717
LL | pub use self::m2::*;
1818
| ^^^^^^^^^^^
@@ -34,7 +34,7 @@ LL | #![deny(ambiguous_glob_reexports)]
3434
| ^^^^^^^^^^^^^^^^^^^^^^^^
3535

3636
error: ambiguous glob re-exports
37-
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:19:13
37+
--> $DIR/issue-107563-ambiguous-glob-reexports.rs:23:13
3838
|
3939
LL | pub use self::m1::*;
4040
| ^^^^^^^^^^^ the name `A` in the type namespace is first re-exported here

0 commit comments

Comments
 (0)