mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
17 lines
404 B
Rust
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);
|