Basically, there are two parts to this question:
Can you pass an unknown identifier to a macro in Rust?
Can you combine strings to generate
There is also https://github.com/dtolnay/paste, which works well in casese where concat_idents is underpowered or in cases where you can't target the nightly compiler.
concat_idents
macro_rules! foo_macro { ( $( $name:ident ),+ ) => { paste::item! { #[test] fn []() { assert! false } } }; }