#identifier #concat #proc-macro

macro concat-mulidents

A simple library for concatenating multiple identifiers

1 unstable release

0.1.0 Oct 20, 2024

#511 in Procedural macros

Unlicense

3KB

Concatenates multiple identifiers.

Usage

use concat_mulidents::concat_idents;
macro_rules! concat_test {
    ($name:ident, $name2:ident) => {
        concat_idents! {
            fn $name--_--$name2() {
                let $name--$name2 = "Hello, World!";
                println!("{}", $name--$name2);
            }
        }
    };
}

fn main () {
    concat_test!(hello, world);
    hello_world();
}

No runtime deps