blob: 791cf0358952a648e6c94d2662271614ebba8c1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#![feature(decl_macro)]
macro x($macro_name:ident) {
#[macro_export]
macro_rules! $macro_name {
(define) => {
pub struct MyStruct;
};
(create) => {
MyStruct {}
};
}
}
x!(my_struct);
|