2021-06-14 07:57:26 -05:00
|
|
|
// check-pass
|
|
|
|
// run-rustfix
|
2021-11-03 22:00:00 -05:00
|
|
|
// edition:2018
|
2021-06-14 07:57:26 -05:00
|
|
|
|
2021-07-06 09:33:11 -05:00
|
|
|
#![warn(rust_2021_prefixes_incompatible_syntax)]
|
2021-06-14 07:57:26 -05: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 09:33:11 -05:00
|
|
|
//~^ WARNING prefix `z` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 15:49:29 -05:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 07:57:26 -05:00
|
|
|
m2!(prefix"hey");
|
2021-07-06 09:33:11 -05:00
|
|
|
//~^ WARNING prefix `prefix` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 15:49:29 -05:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 07:57:26 -05:00
|
|
|
m3!(hey#123);
|
2021-07-06 09:33:11 -05:00
|
|
|
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 15:49:29 -05:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 07:57:26 -05:00
|
|
|
m3!(hey#hey);
|
2021-07-06 09:33:11 -05:00
|
|
|
//~^ WARNING prefix `hey` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 15:49:29 -05:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 07:57:26 -05:00
|
|
|
}
|
2021-06-14 12:07:40 -05:00
|
|
|
|
|
|
|
macro_rules! quote {
|
|
|
|
(# name = # kind # value) => {};
|
|
|
|
}
|
|
|
|
|
|
|
|
quote! {
|
|
|
|
#name = #kind#value
|
2021-07-06 09:33:11 -05:00
|
|
|
//~^ WARNING prefix `kind` is unknown [rust_2021_prefixes_incompatible_syntax]
|
2021-06-26 15:49:29 -05:00
|
|
|
//~| WARNING hard error in Rust 2021
|
2021-06-14 12:07:40 -05:00
|
|
|
}
|