std::concat_idents! [] [src]

macro_rules! concat_idents {
    ($($e:ident),*) => { ... };
}

Concatenate identifiers into one identifier.

This macro takes any number of comma-separated identifiers, and concatenates them all into one, yielding an expression which is a new identifier. Note that hygiene makes it such that this macro cannot capture local variables, and macros are only allowed in item, statement or expression position, meaning this macro may be difficult to use in some situations.

Examples

#![feature(concat_idents)] fn main() { fn foobar() -> u32 { 23 } let f = concat_idents!(foo, bar); println!("{}", f()); }
#![feature(concat_idents)]

fn foobar() -> u32 { 23 }

let f = concat_idents!(foo, bar);
println!("{}", f());