Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 654 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 654 Bytes

Crates.io Rust Documentation

gensym

Creates unique identifiers for macros using procedural macros and UUID

Examples

macro_rules! gen_fn {
    ($a:ty, $b:ty) => {
        gensym::gensym!{ _gen_fn!{ $a, $b } }
    };
}

macro_rules! _gen_fn {
    ($gensym:ident, $a:ty, $b:ty) => {
        fn $gensym(a: $a, b: $b) {
            unimplemented!()
        }
    };
}

mod test {
    gen_fn!{ u64, u64 }
    gen_fn!{ u64, u64 }
}