Skip to content

Commit eb00f78

Browse files
committed
Bless other tests
1 parent 16260d6 commit eb00f78

16 files changed

Lines changed: 87 additions & 67 deletions

tests/ui/imports/cycle-import-in-std-1.stderr

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
error[E0432]: unresolved import `ops`
2-
--> $DIR/cycle-import-in-std-1.rs:5:11
2+
--> $DIR/cycle-import-in-std-1.rs:5:5
33
|
44
LL | use ops::{self as std};
5-
| ^^^^^^^^^^^ no external crate `ops`
5+
| ^^^
66
|
7-
= help: consider importing this module instead:
8-
std::ops
7+
help: a similar path exists
8+
|
9+
LL | use core::ops::{self as std};
10+
| ++++++
911

1012
error: aborting due to 1 previous error
1113

tests/ui/imports/cycle-import-in-std-2.stderr

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
error[E0432]: unresolved import `ops`
2-
--> $DIR/cycle-import-in-std-2.rs:5:11
2+
--> $DIR/cycle-import-in-std-2.rs:5:5
33
|
44
LL | use ops::{self as std};
5-
| ^^^^^^^^^^^ no external crate `ops`
5+
| ^^^
66
|
7-
= help: consider importing this module instead:
8-
std::ops
7+
help: a similar path exists
8+
|
9+
LL | use core::ops::{self as std};
10+
| ++++++
911

1012
error: aborting due to 1 previous error
1113

tests/ui/imports/issue-28388-1.stderr

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ error[E0432]: unresolved import `foo`
22
--> $DIR/issue-28388-1.rs:4:5
33
|
44
LL | use foo::{};
5-
| ^^^ no `foo` in the root
5+
| ^^^ use of unresolved module or unlinked crate `foo`
6+
|
7+
help: you might be missing a crate named `foo`, add it to your project and import it in your code
8+
|
9+
LL + extern crate foo;
10+
|
611

712
error: aborting due to 1 previous error
813

tests/ui/imports/issue-38293.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0432]: unresolved import `foo::f`
2-
--> $DIR/issue-38293.rs:7:14
2+
--> $DIR/issue-38293.rs:7:10
33
|
44
LL | use foo::f::{self};
5-
| ^^^^ no `f` in `foo`
5+
| ^ expected type, found function `f` in `foo`
66

77
error[E0423]: expected function, found module `baz`
88
--> $DIR/issue-38293.rs:16:5

tests/ui/imports/issue-45829/import-self.stderr

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ LL | use foo::self;
4747
= note: `foo` must be defined only once in the type namespace of this module
4848
help: you can use `as` to change the binding name of the import
4949
|
50-
LL - use foo::self;
51-
LL + use foo as other_foo;
52-
|
50+
LL | use foo::self as other_foo;
51+
| ++++++++++++
5352

5453
error[E0252]: the name `A` is defined multiple times
5554
--> $DIR/import-self.rs:16:11

tests/ui/privacy/private-variant-reexport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod m2 {
88
}
99

1010
mod m3 {
11-
pub use ::E::V::{self}; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside
11+
pub use ::E::V::{self}; //~ ERROR unresolved import `E::V`
1212
}
1313

1414
#[deny(unused_imports)]

tests/ui/privacy/private-variant-reexport.stderr

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ note: consider marking `V` as `pub` in the imported module
2222
LL | pub use ::E::{V};
2323
| ^
2424

25-
error[E0365]: `V` is only public within the crate, and cannot be re-exported outside
26-
--> $DIR/private-variant-reexport.rs:11:22
25+
error[E0432]: unresolved import `E::V`
26+
--> $DIR/private-variant-reexport.rs:11:18
2727
|
2828
LL | pub use ::E::V::{self};
29-
| ^^^^ re-export of crate public `V`
30-
|
31-
= note: consider declaring type or module `V` with `pub`
29+
| ^ `V` is a variant, not a module
3230

3331
error: glob import doesn't reexport anything with visibility `pub` because no imported item is public enough
3432
--> $DIR/private-variant-reexport.rs:16:13
@@ -56,5 +54,5 @@ LL | pub use ::E::*;
5654

5755
error: aborting due to 5 previous errors
5856

59-
Some errors have detailed explanations: E0364, E0365.
57+
Some errors have detailed explanations: E0364, E0432.
6058
For more information about an error, try `rustc --explain E0364`.

tests/ui/resolve/resolve-bad-import-prefix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use {}; // OK
88
use ::{}; // OK
99
use m::{}; // OK
1010
use E::{}; // OK
11-
use S::{}; // FIXME, this and `use S::{self};` should be an error
11+
use S::{}; //~ ERROR unresolved import `S`
1212
use Tr::{}; // FIXME, this and `use Tr::{self};` should be an error
1313
use Nonexistent::{}; //~ ERROR unresolved import `Nonexistent`
1414

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
error[E0432]: unresolved import `S`
2+
--> $DIR/resolve-bad-import-prefix.rs:11:5
3+
|
4+
LL | use S::{};
5+
| ^ `S` is a struct, not a module
6+
17
error[E0432]: unresolved import `Nonexistent`
28
--> $DIR/resolve-bad-import-prefix.rs:13:5
39
|
410
LL | use Nonexistent::{};
5-
| ^^^^^^^^^^^ no `Nonexistent` in the root
11+
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `Nonexistent`
12+
|
13+
help: you might be missing a crate named `Nonexistent`, add it to your project and import it in your code
14+
|
15+
LL + extern crate Nonexistent;
16+
|
617

7-
error: aborting due to 1 previous error
18+
error: aborting due to 2 previous errors
819

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

tests/ui/use/pub-use-self-super-crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod foo {
88
pub use self::super as parent2;
99
//~^ ERROR `super` is only public within the crate, and cannot be re-exported outside
1010
pub use super::{self as parent3};
11-
//~^ ERROR `super` is only public within the crate, and cannot be re-exported outside
11+
//~^ ERROR `self` is only public within the crate, and cannot be re-exported outside
1212
pub use self::{super as parent4};
1313
//~^ ERROR `super` is only public within the crate, and cannot be re-exported outside
1414

0 commit comments

Comments
 (0)