Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- macro_rules! build {
- ($($case:ty),*) => { enum Test { $($case),* } };
- }
- fn main() {
- build!{ Foo(i32), Bar(i32, i32) };
- }
- macro_rules! build {
- ($($case:ty),*) => { enum Test { Foo(i32), Bar(i32, i32) } };
- }
- fn main() {
- build!{ Foo(i32), Bar(i32, i32) };
- }
- macro_rules! build {
- ($($case:ident),*) => { enum Test { $($case),* } };
- }
- fn main() {
- build!{ Foo, Bar };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement