Skip to content

Commit f6dd137

Browse files
committedJun 26, 2021
Update reserved prefixes test for new edition lint wording.
1 parent e9fc942 commit f6dd137

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed
 

‎src/test/ui/rust-2021/reserved-prefixes-migration.fixed

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ macro_rules! m3 {
1515
fn main() {
1616
m2!(z "hey");
1717
//~^ WARNING prefix `z` is unknown [reserved_prefix]
18-
//~| WARNING become a hard error
18+
//~| WARNING hard error in Rust 2021
1919
m2!(prefix "hey");
2020
//~^ WARNING prefix `prefix` is unknown [reserved_prefix]
21-
//~| WARNING become a hard error
21+
//~| WARNING hard error in Rust 2021
2222
m3!(hey #123);
2323
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
24-
//~| WARNING become a hard error
24+
//~| WARNING hard error in Rust 2021
2525
m3!(hey #hey);
2626
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
27-
//~| WARNING become a hard error
27+
//~| WARNING hard error in Rust 2021
2828
}
2929

3030
macro_rules! quote {
@@ -34,5 +34,5 @@ macro_rules! quote {
3434
quote! {
3535
#name = #kind #value
3636
//~^ WARNING prefix `kind` is unknown [reserved_prefix]
37-
//~| WARNING become a hard error
37+
//~| WARNING hard error in Rust 2021
3838
}

‎src/test/ui/rust-2021/reserved-prefixes-migration.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ macro_rules! m3 {
1515
fn main() {
1616
m2!(z"hey");
1717
//~^ WARNING prefix `z` is unknown [reserved_prefix]
18-
//~| WARNING become a hard error
18+
//~| WARNING hard error in Rust 2021
1919
m2!(prefix"hey");
2020
//~^ WARNING prefix `prefix` is unknown [reserved_prefix]
21-
//~| WARNING become a hard error
21+
//~| WARNING hard error in Rust 2021
2222
m3!(hey#123);
2323
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
24-
//~| WARNING become a hard error
24+
//~| WARNING hard error in Rust 2021
2525
m3!(hey#hey);
2626
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
27-
//~| WARNING become a hard error
27+
//~| WARNING hard error in Rust 2021
2828
}
2929

3030
macro_rules! quote {
@@ -34,5 +34,5 @@ macro_rules! quote {
3434
quote! {
3535
#name = #kind#value
3636
//~^ WARNING prefix `kind` is unknown [reserved_prefix]
37-
//~| WARNING become a hard error
37+
//~| WARNING hard error in Rust 2021
3838
}

‎src/test/ui/rust-2021/reserved-prefixes-migration.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: the lint level is defined here
99
|
1010
LL | #![warn(reserved_prefix)]
1111
| ^^^^^^^^^^^^^^^
12-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
12+
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
1313
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
1414
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
1515
|
@@ -22,7 +22,7 @@ warning: prefix `prefix` is unknown
2222
LL | m2!(prefix"hey");
2323
| ^^^^^^ unknown prefix
2424
|
25-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
25+
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
2626
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
2727
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
2828
|
@@ -35,7 +35,7 @@ warning: prefix `hey` is unknown
3535
LL | m3!(hey#123);
3636
| ^^^ unknown prefix
3737
|
38-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
38+
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
3939
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
4040
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
4141
|
@@ -48,7 +48,7 @@ warning: prefix `hey` is unknown
4848
LL | m3!(hey#hey);
4949
| ^^^ unknown prefix
5050
|
51-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
51+
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
5252
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
5353
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
5454
|
@@ -61,7 +61,7 @@ warning: prefix `kind` is unknown
6161
LL | #name = #kind#value
6262
| ^^^^ unknown prefix
6363
|
64-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
64+
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
6565
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
6666
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
6767
|

0 commit comments

Comments
 (0)
Please sign in to comment.