18 lines
244 B
Rust
18 lines
244 B
Rust
macro_rules! m {
|
|
($expr: expr, $func: ident) => {
|
|
{
|
|
let x = $expr;
|
|
$func(x)
|
|
}
|
|
};
|
|
|
|
() => {
|
|
};
|
|
|
|
($item: ident) => {
|
|
mod macro_item {
|
|
struct $item;
|
|
}
|
|
};
|
|
}
|