Skip to content

Commit 67df74b

Browse files
bless tests
1 parent 8499dd2 commit 67df74b

14 files changed

+220
-72
lines changed

tests/ui/imports/ambiguous-9.stderr

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,12 @@ LL | pub use super::dsl::*;
2424
| ^^^^^^^^^^^^^
2525
= help: consider adding an explicit import of `date_range` to disambiguate
2626
note: `date_range` could also refer to the function imported here
27-
--> $DIR/ambiguous-9.rs:8:9
28-
|
29-
LL | use super::prelude::*;
30-
| ^^^^^^^^^^^^^^^^^
31-
= help: consider adding an explicit import of `date_range` to disambiguate
32-
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
33-
34-
warning: ambiguous glob re-exports
3527
--> $DIR/ambiguous-9.rs:15:13
3628
|
3729
LL | pub use self::t::*;
3830
| ^^^^^^^^^^
3931
= help: consider adding an explicit import of `date_range` to disambiguate
40-
= note: `#[deny(ambiguous_glob_imports)]` on by default
32+
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
4133

4234
error: aborting due to 1 previous error; 1 warning emitted
4335

@@ -60,32 +52,8 @@ LL | pub use super::dsl::*;
6052
note: `date_range` could also refer to the function imported here
6153
--> $DIR/ambiguous-9.rs:15:13
6254
|
63-
LL | use super::prelude::*;
64-
| ^^^^^^^^^^^^^^^^^
65-
= help: consider adding an explicit import of `date_range` to disambiguate
66-
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
67-
68-
Future breakage diagnostic:
69-
error: `date_range` is ambiguous
70-
--> $DIR/ambiguous-9.rs:23:5
71-
|
72-
LL | date_range();
73-
| ^^^^^^^^^^ ambiguous name
74-
|
75-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
76-
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
77-
= note: ambiguous because of multiple glob imports of a name in the same module
78-
note: `date_range` could refer to the function imported here
79-
--> $DIR/ambiguous-9.rs:19:5
80-
|
81-
LL | use dsl::*;
82-
| ^^^^^^
83-
= help: consider adding an explicit import of `date_range` to disambiguate
84-
note: `date_range` could also refer to the function imported here
85-
--> $DIR/ambiguous-9.rs:20:5
86-
|
87-
LL | use prelude::*;
88-
| ^^^^^^^^^^
55+
LL | pub use self::t::*;
56+
| ^^^^^^^^^^
8957
= help: consider adding an explicit import of `date_range` to disambiguate
9058
= note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default
9159

tests/ui/imports/import-loop-2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
mod a {
2-
pub use crate::b::x;
2+
pub use crate::b::x; //~ ERROR unresolved import `crate::b::x` [E0432]
33
}
44

55
mod b {
6-
pub use crate::a::x; //~ ERROR unresolved import `crate::a::x`
6+
pub use crate::a::x;
77

88
fn main() { let y = x; }
99
}

tests/ui/imports/import-loop-2.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0432]: unresolved import `crate::a::x`
2-
--> $DIR/import-loop-2.rs:6:13
1+
error[E0432]: unresolved import `crate::b::x`
2+
--> $DIR/import-loop-2.rs:2:13
33
|
4-
LL | pub use crate::a::x;
5-
| ^^^^^^^^^^^ no `x` in `a`
4+
LL | pub use crate::b::x;
5+
| ^^^^^^^^^^^ no `x` in `b`
66

77
error: aborting due to 1 previous error
88

tests/ui/imports/import4.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mod a { pub use crate::b::foo; }
2-
mod b { pub use crate::a::foo; } //~ ERROR unresolved import `crate::a::foo`
1+
mod a { pub use crate::b::foo; } //~ ERROR unresolved import `crate::b::foo`
2+
mod b { pub use crate::a::foo; }
33

44
fn main() { println!("loop"); }

tests/ui/imports/import4.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0432]: unresolved import `crate::a::foo`
2-
--> $DIR/import4.rs:2:17
1+
error[E0432]: unresolved import `crate::b::foo`
2+
--> $DIR/import4.rs:1:17
33
|
4-
LL | mod b { pub use crate::a::foo; }
5-
| ^^^^^^^^^^^^^ no `foo` in `a`
4+
LL | mod a { pub use crate::b::foo; }
5+
| ^^^^^^^^^^^^^ no `foo` in `b`
66

77
error: aborting due to 1 previous error
88

tests/ui/imports/issue-109148.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ macro_rules! m {
1010

1111
m!();
1212

13-
use std::mem; //~ ERROR `std` is ambiguous
14-
use ::std::mem as _; //~ ERROR `std` is ambiguous
13+
use std::mem; //~ ERROR `std` is ambiguous [E0659]
14+
use ::std::mem as _; //~ ERROR `std` is ambiguous [E0659]
1515

1616
fn main() {}

tests/ui/imports/issue-109148.stderr

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,45 @@ LL | m!();
4646
| ---- in this macro invocation
4747
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
4848

49-
error: aborting due to 3 previous errors
49+
error[E0659]: `std` is ambiguous
50+
--> $DIR/issue-109148.rs:13:5
51+
|
52+
LL | use std::mem;
53+
| ^^^ ambiguous name
54+
|
55+
= note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
56+
= note: `std` could refer to a built-in crate
57+
note: `std` could also refer to the crate imported here
58+
--> $DIR/issue-109148.rs:6:9
59+
|
60+
LL | extern crate core as std;
61+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
62+
...
63+
LL | m!();
64+
| ---- in this macro invocation
65+
= help: use `crate::std` to refer to this crate unambiguously
66+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
67+
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
68+
69+
error[E0659]: `std` is ambiguous
70+
--> $DIR/issue-109148.rs:14:7
71+
|
72+
LL | use ::std::mem as _;
73+
| ^^^ ambiguous name
74+
|
75+
= note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
76+
= note: `std` could refer to a built-in crate
77+
note: `std` could also refer to the crate imported here
78+
--> $DIR/issue-109148.rs:6:9
79+
|
80+
LL | extern crate core as std;
81+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
82+
...
83+
LL | m!();
84+
| ---- in this macro invocation
85+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
86+
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
87+
88+
error: aborting due to 5 previous errors
5089

5190
For more information about this error, try `rustc --explain E0659`.

tests/ui/imports/issue-56125.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
mod m1 {
66
use issue_56125::last_segment::*;
7-
//~^ ERROR `issue_56125` is ambiguous
7+
//~^ ERROR `issue_56125` is ambiguous [E0659]
88
}
99

1010
mod m2 {
1111
use issue_56125::non_last_segment::non_last_segment::*;
12-
//~^ ERROR `issue_56125` is ambiguous
12+
//~^ ERROR `issue_56125` is ambiguous [E0659]
1313
}
1414

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::*; //~ ERROR `issue_56125` is ambiguous [E0659]
1919
}
2020

2121
fn main() {}

tests/ui/imports/issue-56125.stderr

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,59 @@ 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:6:9
59+
|
60+
LL | use issue_56125::last_segment::*;
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:6:9
68+
|
69+
LL | use issue_56125::last_segment::*;
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+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
74+
75+
error[E0659]: `issue_56125` is ambiguous
76+
--> $DIR/issue-56125.rs:11:9
77+
|
78+
LL | use issue_56125::non_last_segment::non_last_segment::*;
79+
| ^^^^^^^^^^^ ambiguous name
80+
|
81+
= note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
82+
= note: `issue_56125` could refer to a crate passed with `--extern`
83+
= help: use `::issue_56125` to refer to this crate unambiguously
84+
note: `issue_56125` could also refer to the module imported here
85+
--> $DIR/issue-56125.rs:11:9
86+
|
87+
LL | use issue_56125::non_last_segment::non_last_segment::*;
88+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89+
= help: consider adding an explicit import of `issue_56125` to disambiguate
90+
= help: or use `self::issue_56125` to refer to this module unambiguously
91+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
92+
93+
error[E0659]: `issue_56125` is ambiguous
94+
--> $DIR/issue-56125.rs:18:9
95+
|
96+
LL | use issue_56125::*;
97+
| ^^^^^^^^^^^ ambiguous name
98+
|
99+
= note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
100+
= note: `issue_56125` could refer to a crate passed with `--extern`
101+
= help: use `::issue_56125` to refer to this crate unambiguously
102+
note: `issue_56125` could also refer to the module imported here
103+
--> $DIR/issue-56125.rs:18:9
104+
|
105+
LL | use issue_56125::*;
106+
| ^^^^^^^^^^^^^^
107+
= help: consider adding an explicit import of `issue_56125` to disambiguate
108+
= help: or use `self::issue_56125` to refer to this module unambiguously
109+
57110
error[E0659]: `issue_56125` is ambiguous
58111
--> $DIR/issue-56125.rs:18:9
59112
|
@@ -70,8 +123,9 @@ LL | use issue_56125::*;
70123
| ^^^^^^^^^^^^^^
71124
= help: consider adding an explicit import of `issue_56125` to disambiguate
72125
= help: or use `self::issue_56125` to refer to this module unambiguously
126+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
73127

74-
error: aborting due to 4 previous errors
128+
error: aborting due to 7 previous errors
75129

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

tests/ui/imports/issue-57539.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ edition:2018
22

33
mod core {
4-
use core; //~ ERROR `core` is ambiguous
4+
use core; //~ ERROR `core` is ambiguous [E0659]
55
use crate::*;
66
}
77

0 commit comments

Comments
 (0)