Update reserved prefixes test for new edition lint wording.

This commit is contained in:
Mara Bos 2021-06-26 20:49:29 +00:00
parent e9fc942b4d
commit f6dd1378f0
3 changed files with 15 additions and 15 deletions

View file

@ -15,16 +15,16 @@ macro_rules! m3 {
fn main() {
m2!(z "hey");
//~^ WARNING prefix `z` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
m2!(prefix "hey");
//~^ WARNING prefix `prefix` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
m3!(hey #123);
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
m3!(hey #hey);
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
}
macro_rules! quote {
@ -34,5 +34,5 @@ macro_rules! quote {
quote! {
#name = #kind #value
//~^ WARNING prefix `kind` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
}

View file

@ -15,16 +15,16 @@ macro_rules! m3 {
fn main() {
m2!(z"hey");
//~^ WARNING prefix `z` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
m2!(prefix"hey");
//~^ WARNING prefix `prefix` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
m3!(hey#123);
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
m3!(hey#hey);
//~^ WARNING prefix `hey` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
}
macro_rules! quote {
@ -34,5 +34,5 @@ macro_rules! quote {
quote! {
#name = #kind#value
//~^ WARNING prefix `kind` is unknown [reserved_prefix]
//~| WARNING become a hard error
//~| WARNING hard error in Rust 2021
}

View file

@ -9,7 +9,7 @@ note: the lint level is defined here
|
LL | #![warn(reserved_prefix)]
| ^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
@ -22,7 +22,7 @@ warning: prefix `prefix` is unknown
LL | m2!(prefix"hey");
| ^^^^^^ unknown prefix
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
@ -35,7 +35,7 @@ warning: prefix `hey` is unknown
LL | m3!(hey#123);
| ^^^ unknown prefix
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
@ -48,7 +48,7 @@ warning: prefix `hey` is unknown
LL | m3!(hey#hey);
| ^^^ unknown prefix
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|
@ -61,7 +61,7 @@ warning: prefix `kind` is unknown
LL | #name = #kind#value
| ^^^^ unknown prefix
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
= note: for more information, see issue #84978 <https://github.com/rust-lang/rust/issues/84978>
help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
|