Skip to content

Commit 3702121

Browse files
committed
Bless other tests
1 parent 62e3a5b commit 3702121

15 files changed

+42
-97
lines changed

tests/ui/delegation/target-expr-pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct S(F); //~ WARN struct `S` is never constructed
2525
impl Trait for S {
2626
reuse <F as Trait>::bar {
2727
#[allow(unused_imports)]
28-
use self::to_reuse::{foo, inner::self};
28+
use self::to_reuse::{foo, inner::{self}};
2929
let x = foo(12);
3030
assert_eq!(x, 12);
3131
&self.0

tests/ui/dollar-crate/dollar-crate-is-keyword-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod a {}
22

33
macro_rules! m {
44
() => {
5-
use a::$crate; //~ ERROR unresolved import `a::$crate`
5+
use a::$crate; //~ ERROR `$crate` in paths can only be used in start position
66
use a::$crate::b; //~ ERROR `$crate` in paths can only be used in start position
77
type A = a::$crate; //~ ERROR `$crate` in paths can only be used in start position
88
}

tests/ui/dollar-crate/dollar-crate-is-keyword-2.stderr

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
error[E0433]: failed to resolve: `$crate` in paths can only be used in start position
2-
--> $DIR/dollar-crate-is-keyword-2.rs:6:16
1+
error: `$crate` in paths can only be used in start position
2+
--> $DIR/dollar-crate-is-keyword-2.rs:5:16
33
|
4-
LL | use a::$crate::b;
5-
| ^^^^^^ `$crate` in paths can only be used in start position
4+
LL | use a::$crate;
5+
| ^^^^^^
66
...
77
LL | m!();
88
| ---- in this macro invocation
99
|
1010
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
1111

12-
error[E0432]: unresolved import `a::$crate`
13-
--> $DIR/dollar-crate-is-keyword-2.rs:5:13
12+
error[E0433]: failed to resolve: `$crate` in paths can only be used in start position
13+
--> $DIR/dollar-crate-is-keyword-2.rs:6:16
1414
|
15-
LL | use a::$crate;
16-
| ^^^^^^^^^ no `$crate` in `a`
15+
LL | use a::$crate::b;
16+
| ^^^^^^ `$crate` in paths can only be used in start position
1717
...
1818
LL | m!();
1919
| ---- in this macro invocation
@@ -33,5 +33,4 @@ LL | m!();
3333

3434
error: aborting due to 3 previous errors
3535

36-
Some errors have detailed explanations: E0432, E0433.
37-
For more information about an error, try `rustc --explain E0432`.
36+
For more information about this error, try `rustc --explain E0433`.

tests/ui/dollar-crate/dollar-crate-is-keyword.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ macro_rules! m {
88

99
use $crate; //~ ERROR `$crate` may not be imported
1010
use $crate as $crate; //~ ERROR expected identifier, found reserved identifier `$crate`
11-
//~^ ERROR `$crate` may not be imported
1211
}
1312
}
1413

tests/ui/dollar-crate/dollar-crate-is-keyword.stderr

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,15 @@ LL | m!();
2121
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
2222

2323
error: `$crate` may not be imported
24-
--> $DIR/dollar-crate-is-keyword.rs:9:9
24+
--> $DIR/dollar-crate-is-keyword.rs:9:13
2525
|
2626
LL | use $crate;
27-
| ^^^^^^^^^^^
27+
| ^^^^^^
2828
...
2929
LL | m!();
3030
| ---- in this macro invocation
3131
|
3232
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
3333

34-
error: `$crate` may not be imported
35-
--> $DIR/dollar-crate-is-keyword.rs:10:9
36-
|
37-
LL | use $crate as $crate;
38-
| ^^^^^^^^^^^^^^^^^^^^^
39-
...
40-
LL | m!();
41-
| ---- in this macro invocation
42-
|
43-
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
44-
45-
error: aborting due to 4 previous errors
34+
error: aborting due to 3 previous errors
4635

tests/ui/error-codes/E0430.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use std::fmt::{self, self}; //~ ERROR E0430
2-
//~^ ERROR E0252
1+
use std::fmt::{self, self}; //~ ERROR the name `fmt` is defined multiple times
32

43
fn main () {
54
}

tests/ui/error-codes/E0430.stderr

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
error[E0430]: `self` import can only appear once in an import list
2-
--> $DIR/E0430.rs:1:16
3-
|
4-
LL | use std::fmt::{self, self};
5-
| ^^^^ ---- another `self` import appears here
6-
| |
7-
| can only appear once in an import list
8-
91
error[E0252]: the name `fmt` is defined multiple times
102
--> $DIR/E0430.rs:1:22
113
|
@@ -16,7 +8,6 @@ LL | use std::fmt::{self, self};
168
|
179
= note: `fmt` must be defined only once in the type namespace of this module
1810

19-
error: aborting due to 2 previous errors
11+
error: aborting due to 1 previous error
2012

21-
Some errors have detailed explanations: E0252, E0430.
22-
For more information about an error, try `rustc --explain E0252`.
13+
For more information about this error, try `rustc --explain E0252`.

tests/ui/imports/issue-47623.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
use self; //~ERROR `self` imports are only allowed within a { } list
1+
use self; //~ERROR imports need to be explicitly named
22

33
fn main() {}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
error[E0429]: `self` imports are only allowed within a { } list
1+
error: imports need to be explicitly named
22
--> $DIR/issue-47623.rs:1:5
33
|
44
LL | use self;
55
| ^^^^
66

77
error: aborting due to 1 previous error
88

9-
For more information about this error, try `rustc --explain E0429`.

tests/ui/use/use-keyword.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
// Check that imports with naked super and self don't fail during parsing
2-
// FIXME: this shouldn't fail during name resolution either
1+
//@ check-pass
32

43
mod a {
54
mod b {
65
use self as A;
7-
//~^ ERROR `self` imports are only allowed within a { } list
86
use super as B;
9-
//~^ ERROR unresolved import `super` [E0432]
10-
//~| NOTE no `super` in the root
117
use super::{self as C};
12-
//~^ ERROR unresolved import `super` [E0432]
13-
//~| NOTE no `super` in the root
148
}
159
}
1610

0 commit comments

Comments
 (0)