rename rust_2021_token_prefixes to rust_2021_prefixes_incompatible_syntax
This commit is contained in:
parent
941eb2adbd
commit
d4e384bc1d
5 changed files with 20 additions and 20 deletions
|
|
@ -2,7 +2,7 @@
|
|||
// run-rustfix
|
||||
// compile-flags: -Z unstable-options --edition 2018
|
||||
|
||||
#![warn(rust_2021_token_prefixes)]
|
||||
#![warn(rust_2021_prefixes_incompatible_syntax)]
|
||||
|
||||
macro_rules! m2 {
|
||||
($a:tt $b:tt) => {};
|
||||
|
|
@ -14,16 +14,16 @@ macro_rules! m3 {
|
|||
|
||||
fn main() {
|
||||
m2!(z "hey");
|
||||
//~^ WARNING prefix `z` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `z` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
m2!(prefix "hey");
|
||||
//~^ WARNING prefix `prefix` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `prefix` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
m3!(hey #123);
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
m3!(hey #hey);
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
}
|
||||
|
||||
|
|
@ -33,6 +33,6 @@ macro_rules! quote {
|
|||
|
||||
quote! {
|
||||
#name = #kind #value
|
||||
//~^ WARNING prefix `kind` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `kind` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// run-rustfix
|
||||
// compile-flags: -Z unstable-options --edition 2018
|
||||
|
||||
#![warn(rust_2021_token_prefixes)]
|
||||
#![warn(rust_2021_prefixes_incompatible_syntax)]
|
||||
|
||||
macro_rules! m2 {
|
||||
($a:tt $b:tt) => {};
|
||||
|
|
@ -14,16 +14,16 @@ macro_rules! m3 {
|
|||
|
||||
fn main() {
|
||||
m2!(z"hey");
|
||||
//~^ WARNING prefix `z` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `z` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
m2!(prefix"hey");
|
||||
//~^ WARNING prefix `prefix` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `prefix` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
m3!(hey#123);
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
m3!(hey#hey);
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
}
|
||||
|
||||
|
|
@ -33,6 +33,6 @@ macro_rules! quote {
|
|||
|
||||
quote! {
|
||||
#name = #kind#value
|
||||
//~^ WARNING prefix `kind` is unknown [rust_2021_token_prefixes]
|
||||
//~^ WARNING prefix `kind` is unknown [rust_2021_prefixes_incompatible_syntax]
|
||||
//~| WARNING hard error in Rust 2021
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ LL | m2!(z"hey");
|
|||
note: the lint level is defined here
|
||||
--> $DIR/reserved-prefixes-migration.rs:5:9
|
||||
|
|
||||
LL | #![warn(rust_2021_token_prefixes)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #![warn(rust_2021_prefixes_incompatible_syntax)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue