Skip to content

Commit

Permalink
Update reserved prefixes test for new edition lint wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Jun 26, 2021
1 parent e9fc942 commit f6dd137
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/test/ui/rust-2021/reserved-prefixes-migration.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
10 changes: 5 additions & 5 deletions src/test/ui/rust-2021/reserved-prefixes-migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
10 changes: 5 additions & 5 deletions src/test/ui/rust-2021/reserved-prefixes-migration.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
|
Expand All @@ -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
|
Expand All @@ -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
|
Expand All @@ -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
|
Expand All @@ -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
|
Expand Down

0 comments on commit f6dd137

Please sign in to comment.