2021-06-14 12:57:26 +00:00
|
|
|
//@ check-pass
|
|
|
|
//@ run-rustfix
|
2021-11-04 03:00:00 +00:00
|
|
|
//@ edition:2018
|
2021-06-14 12:57:26 +00:00
|
|
|
|
2021-07-06 14:33:11 +00:00
|
|
|
#![warn(rust_2021_prefixes_incompatible_syntax)]
|
2021-06-14 12:57:26 +00:00
|
|
|
|
|
|
|
macro_rules! m2 {
|
|
|
|
($a:tt $b:tt) => {};
|
|
|
|
}
|
|
|
|
|
|
|
|
macro_rules! m3 {
|
|
|
|
($a:tt $b:tt $c:tt) => {};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
m2!(z"hey");
|
2021-07-06 14:33:11 +00:00
|
|
|
//~^ WARNING prefix `z` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 20:49:29 +00:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 12:57:26 +00:00
|
|
|
m2!(prefix"hey");
|
2021-07-06 14:33:11 +00:00
|
|
|
//~^ WARNING prefix `prefix` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 20:49:29 +00:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 12:57:26 +00:00
|
|
|
m3!(hey#123);
|
2021-07-06 14:33:11 +00:00
|
|
|
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 20:49:29 +00:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 12:57:26 +00:00
|
|
|
m3!(hey#hey);
|
2021-07-06 14:33:11 +00:00
|
|
|
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 20:49:29 +00:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 12:57:26 +00:00
|
|
|
}
|
2021-06-14 17:07:40 +00:00
|
|
|
|
|
|
|
macro_rules! quote {
|
|
|
|
(# name = # kind # value) => {};
|
|
|
|
}
|
|
|
|
|
|
|
|
quote! {
|
|
|
|
#name = #kind#value
|
2021-07-06 14:33:11 +00:00
|
|
|
//~^ WARNING prefix `kind` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 20:49:29 +00:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 17:07:40 +00:00
|
|
|
}
|