#identifier

macro concat-mulidents

A simple library for concatenating multiple identifiers

1 unstable release

0.1.0 Oct 20, 2024

#442 in Procedural macros

Download history 91/week @ 2024-10-14 51/week @ 2024-10-21

142 downloads per month

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