rust/tests/ui/hygiene/auxiliary/use_by_macro.rs
2023-01-11 09:32:08 +00:00

16 lines
252 B
Rust

#![feature(decl_macro)]
macro x($macro_name:ident) {
#[macro_export]
macro_rules! $macro_name {
(define) => {
pub struct MyStruct;
};
(create) => {
MyStruct {}
};
}
}
x!(my_struct);