2025-08-08 10:31:37 -07:00
|
|
|
#![feature(macro_attr)]
|
|
|
|
|
|
|
|
|
|
macro_rules! local_attr {
|
|
|
|
|
attr() { $($body:tt)* } => {
|
|
|
|
|
compile_error!(concat!("local_attr: ", stringify!($($body)*)));
|
|
|
|
|
};
|
|
|
|
|
//~^^ ERROR: local_attr
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
#[local_attr]
|
|
|
|
|
struct S;
|
2025-08-08 10:38:46 -07:00
|
|
|
|
|
|
|
|
local_attr!(arg); //~ ERROR: macro has no rules for function-like invocation
|
2025-08-08 10:31:37 -07:00
|
|
|
}
|