Skip to content

Commit b286bc3

Browse files
fix aux-build failures
1 parent 3be0b6b commit b286bc3

File tree

6 files changed

+50
-30
lines changed

6 files changed

+50
-30
lines changed

tests/ui/imports/ambiguous-1.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
//@ check-pass
12
// https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883
23

4+
#![warn(ambiguous_glob_imports)]
5+
36
macro_rules! m {
47
() => {
58
pub fn id() {}
@@ -24,6 +27,6 @@ pub use openssl::*;
2427

2528
fn main() {
2629
id();
27-
//~^ ERROR `id` is ambiguous
30+
//~^ WARNING `id` is ambiguous
2831
//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2932
}

tests/ui/imports/ambiguous-1.stderr

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: ambiguous glob re-exports
2-
--> $DIR/ambiguous-1.rs:10:13
2+
--> $DIR/ambiguous-1.rs:13:13
33
|
44
LL | pub use self::evp::*;
55
| ^^^^^^^^^^^^ the name `id` in the value namespace is first re-exported here
@@ -9,8 +9,8 @@ LL | pub use self::handwritten::*;
99
|
1010
= note: `#[warn(ambiguous_glob_reexports)]` on by default
1111

12-
error: `id` is ambiguous
13-
--> $DIR/ambiguous-1.rs:26:5
12+
warning: `id` is ambiguous
13+
--> $DIR/ambiguous-1.rs:29:5
1414
|
1515
LL | id();
1616
| ^^ ambiguous name
@@ -19,24 +19,28 @@ LL | id();
1919
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
2020
= note: ambiguous because of multiple glob imports of a name in the same module
2121
note: `id` could refer to the function imported here
22-
--> $DIR/ambiguous-1.rs:10:13
22+
--> $DIR/ambiguous-1.rs:13:13
2323
|
2424
LL | pub use self::evp::*;
2525
| ^^^^^^^^^^^^
2626
= help: consider adding an explicit import of `id` to disambiguate
2727
note: `id` could also refer to the function imported here
28-
--> $DIR/ambiguous-1.rs:12:13
28+
--> $DIR/ambiguous-1.rs:15:13
2929
|
3030
LL | pub use self::handwritten::*;
3131
| ^^^^^^^^^^^^^^^^^^^^
3232
= help: consider adding an explicit import of `id` to disambiguate
33-
= note: `#[deny(ambiguous_glob_imports)]` on by default
33+
note: the lint level is defined here
34+
--> $DIR/ambiguous-1.rs:4:9
35+
|
36+
LL | #![warn(ambiguous_glob_imports)]
37+
| ^^^^^^^^^^^^^^^^^^^^^^
3438

35-
error: aborting due to 1 previous error; 1 warning emitted
39+
warning: 2 warnings emitted
3640

3741
Future incompatibility report: Future breakage diagnostic:
38-
error: `id` is ambiguous
39-
--> $DIR/ambiguous-1.rs:26:5
42+
warning: `id` is ambiguous
43+
--> $DIR/ambiguous-1.rs:29:5
4044
|
4145
LL | id();
4246
| ^^ ambiguous name
@@ -45,16 +49,20 @@ LL | id();
4549
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
4650
= note: ambiguous because of multiple glob imports of a name in the same module
4751
note: `id` could refer to the function imported here
48-
--> $DIR/ambiguous-1.rs:10:13
52+
--> $DIR/ambiguous-1.rs:13:13
4953
|
5054
LL | pub use self::evp::*;
5155
| ^^^^^^^^^^^^
5256
= help: consider adding an explicit import of `id` to disambiguate
5357
note: `id` could also refer to the function imported here
54-
--> $DIR/ambiguous-1.rs:12:13
58+
--> $DIR/ambiguous-1.rs:15:13
5559
|
5660
LL | pub use self::handwritten::*;
5761
| ^^^^^^^^^^^^^^^^^^^^
5862
= help: consider adding an explicit import of `id` to disambiguate
59-
= note: `#[deny(ambiguous_glob_imports)]` on by default
63+
note: the lint level is defined here
64+
--> $DIR/ambiguous-1.rs:4:9
65+
|
66+
LL | #![warn(ambiguous_glob_imports)]
67+
| ^^^^^^^^^^^^^^^^^^^^^^
6068

tests/ui/imports/ambiguous-2.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//@ ignore-test
2-
// ^^ don't know how to change this test
1+
//@ check-pass
32
//@ aux-build: ../ambiguous-1.rs
43
// https://github.com/rust-lang/rust/pull/113099#issuecomment-1633574396
54

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
//@ check-pass
12
// https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883
23

4+
#![warn(ambiguous_glob_imports)]
5+
36
macro_rules! m {
47
() => {
58
pub fn id() {}
@@ -20,6 +23,6 @@ mod handwritten {
2023

2124
fn main() {
2225
id();
23-
//~^ ERROR `id` is ambiguous
26+
//~^ WARNING `id` is ambiguous
2427
//~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2528
}
Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: ambiguous glob re-exports
2-
--> $DIR/ambiguous-4-extern.rs:9:9
2+
--> $DIR/ambiguous-4-extern.rs:12:9
33
|
44
LL | pub use evp::*;
55
| ^^^^^^ the name `id` in the value namespace is first re-exported here
@@ -8,8 +8,8 @@ LL | pub use handwritten::*;
88
|
99
= note: `#[warn(ambiguous_glob_reexports)]` on by default
1010

11-
error: `id` is ambiguous
12-
--> $DIR/ambiguous-4-extern.rs:22:5
11+
warning: `id` is ambiguous
12+
--> $DIR/ambiguous-4-extern.rs:25:5
1313
|
1414
LL | id();
1515
| ^^ ambiguous name
@@ -18,24 +18,28 @@ LL | id();
1818
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
1919
= note: ambiguous because of multiple glob imports of a name in the same module
2020
note: `id` could refer to the function imported here
21-
--> $DIR/ambiguous-4-extern.rs:9:9
21+
--> $DIR/ambiguous-4-extern.rs:12:9
2222
|
2323
LL | pub use evp::*;
2424
| ^^^^^^
2525
= help: consider adding an explicit import of `id` to disambiguate
2626
note: `id` could also refer to the function imported here
27-
--> $DIR/ambiguous-4-extern.rs:10:9
27+
--> $DIR/ambiguous-4-extern.rs:13:9
2828
|
2929
LL | pub use handwritten::*;
3030
| ^^^^^^^^^^^^^^
3131
= help: consider adding an explicit import of `id` to disambiguate
32-
= note: `#[deny(ambiguous_glob_imports)]` on by default
32+
note: the lint level is defined here
33+
--> $DIR/ambiguous-4-extern.rs:4:9
34+
|
35+
LL | #![warn(ambiguous_glob_imports)]
36+
| ^^^^^^^^^^^^^^^^^^^^^^
3337

34-
error: aborting due to 1 previous error; 1 warning emitted
38+
warning: 2 warnings emitted
3539

3640
Future incompatibility report: Future breakage diagnostic:
37-
error: `id` is ambiguous
38-
--> $DIR/ambiguous-4-extern.rs:22:5
41+
warning: `id` is ambiguous
42+
--> $DIR/ambiguous-4-extern.rs:25:5
3943
|
4044
LL | id();
4145
| ^^ ambiguous name
@@ -44,16 +48,20 @@ LL | id();
4448
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
4549
= note: ambiguous because of multiple glob imports of a name in the same module
4650
note: `id` could refer to the function imported here
47-
--> $DIR/ambiguous-4-extern.rs:9:9
51+
--> $DIR/ambiguous-4-extern.rs:12:9
4852
|
4953
LL | pub use evp::*;
5054
| ^^^^^^
5155
= help: consider adding an explicit import of `id` to disambiguate
5256
note: `id` could also refer to the function imported here
53-
--> $DIR/ambiguous-4-extern.rs:10:9
57+
--> $DIR/ambiguous-4-extern.rs:13:9
5458
|
5559
LL | pub use handwritten::*;
5660
| ^^^^^^^^^^^^^^
5761
= help: consider adding an explicit import of `id` to disambiguate
58-
= note: `#[deny(ambiguous_glob_imports)]` on by default
62+
note: the lint level is defined here
63+
--> $DIR/ambiguous-4-extern.rs:4:9
64+
|
65+
LL | #![warn(ambiguous_glob_imports)]
66+
| ^^^^^^^^^^^^^^^^^^^^^^
5967

tests/ui/imports/ambiguous-4.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//@ ignore-test
2-
// ^^ don't know how to change this test
1+
//@ check-pass
32
//@ aux-build: ../ambiguous-4-extern.rs
43

54
extern crate ambiguous_4_extern;

0 commit comments

Comments
 (0)