blob: 3a942973e5ece47e5284ed10ea71a64dfa0b005d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#![crate_type = "lib"]
#![feature(macro_attr)]
macro_rules! attr {
attr[$($args:tt)*] { $($body:tt)* } => {
//~^ ERROR: `attr` rule argument matchers require parentheses
//~v ERROR: attr:
compile_error!(concat!(
"attr: args=\"",
stringify!($($args)*),
"\" body=\"",
stringify!($($body)*),
"\"",
));
};
}
#[attr]
struct S;
|