rust/tests/ui/proc-macro/auxiliary/nested-macro-rules.rs
2023-01-11 09:32:08 +00:00

17 lines
404 B
Rust

pub struct FirstStruct;
#[macro_export]
macro_rules! outer_macro {
($name:ident, $attr_struct_name:ident) => {
#[macro_export]
macro_rules! inner_macro {
($bang_macro:ident, $attr_macro:ident) => {
$bang_macro!($name);
#[$attr_macro] struct $attr_struct_name {}
}
}
}
}
outer_macro!(FirstStruct, FirstAttrStruct);