1// check-pass 2// run-rustfix 3// edition:2018 4 5#![warn(rust_2021_prefixes_incompatible_syntax)] 6 7macro_rules! m2 { 8 ($a:tt $b:tt) => {}; 9} 10 11macro_rules! m3 { 12 ($a:tt $b:tt $c:tt) => {}; 13} 14 15fn main() { 16 m2!(z "hey"); 17 //~^ WARNING prefix `z` is unknown [rust_2021_prefixes_incompatible_syntax] 18 //~| WARNING hard error in Rust 2021 19 m2!(prefix "hey"); 20 //~^ WARNING prefix `prefix` is unknown [rust_2021_prefixes_incompatible_syntax] 21 //~| WARNING hard error in Rust 2021 22 m3!(hey #123); 23 //~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax] 24 //~| WARNING hard error in Rust 2021 25 m3!(hey #hey); 26 //~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax] 27 //~| WARNING hard error in Rust 2021 28} 29 30macro_rules! quote { 31 (# name = # kind # value) => {}; 32} 33 34quote! { 35 #name = #kind #value 36 //~^ WARNING prefix `kind` is unknown [rust_2021_prefixes_incompatible_syntax] 37 //~| WARNING hard error in Rust 2021 38} 39