Skip to content

Commit 3323f1e

Browse files
committed
Update src/test/ui
1 parent 72ee362 commit 3323f1e

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

src/test/ui/dollar-crate/dollar-crate-is-keyword.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ macro_rules! m {
66
struct $crate {} //~ ERROR expected identifier, found reserved identifier `$crate`
77
}
88

9-
use $crate; // OK
10-
//~^ WARN `$crate` may not be imported
9+
use $crate; // ERROR `$crate` may not be imported
1110
use $crate as $crate; //~ ERROR expected identifier, found reserved identifier `$crate`
12-
//~^ WARN `$crate` may not be imported
1311
}
1412
}
1513

src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,31 @@ LL | m!();
88
| ----- in this macro invocation
99

1010
error: expected identifier, found reserved identifier `$crate`
11-
--> $DIR/dollar-crate-is-keyword.rs:11:23
11+
--> $DIR/dollar-crate-is-keyword.rs:10:23
1212
|
1313
LL | use $crate as $crate;
1414
| ^^^^^^ expected identifier, found reserved identifier
1515
...
1616
LL | m!();
1717
| ----- in this macro invocation
1818

19-
warning: `$crate` may not be imported
19+
error: `$crate` may not be imported
2020
--> $DIR/dollar-crate-is-keyword.rs:9:9
2121
|
22-
LL | use $crate; // OK
22+
LL | use $crate; // ERROR `$crate` may not be imported
2323
| ^^^^^^^^^^^
2424
...
2525
LL | m!();
2626
| ----- in this macro invocation
27-
|
28-
= note: `use $crate;` was erroneously allowed and will become a hard error in a future release
2927

30-
warning: `$crate` may not be imported
31-
--> $DIR/dollar-crate-is-keyword.rs:11:9
28+
error: `$crate` may not be imported
29+
--> $DIR/dollar-crate-is-keyword.rs:10:9
3230
|
3331
LL | use $crate as $crate;
3432
| ^^^^^^^^^^^^^^^^^^^^^
3533
...
3634
LL | m!();
3735
| ----- in this macro invocation
38-
|
39-
= note: `use $crate;` was erroneously allowed and will become a hard error in a future release
4036

41-
error: aborting due to 2 previous errors
37+
error: aborting due to 4 previous errors
4238

src/test/ui/imports/import-crate-var.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55

66
fn main() {
77
m!();
8-
//~^ WARN `$crate` may not be imported
9-
//~| NOTE `use $crate;` was erroneously allowed and will become a hard error
8+
//~^ ERROR `$crate` may not be imported
109
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
warning: `$crate` may not be imported
1+
error: `$crate` may not be imported
22
--> $DIR/import-crate-var.rs:7:5
33
|
44
LL | m!();
55
| ^^^^^
66
|
7-
= note: `use $crate;` was erroneously allowed and will become a hard error in a future release
87
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
98

0 commit comments

Comments
 (0)