Alternative of declarative macro?

Writing declarative macro if fun, but it does not allow to parametrize neither name of functions nor associated functions.

Struct1::concat_idents!( prefix, $postfix )();

I need it to write 1k lines of tests instead of 10k, so compilation time is not as critical. Maybe exists a crate with alternative based on procedural macros which provide such parametrization?


Give paste! a try. Playground.

    Struct1::[<prefix_ $postfix>]()

That's cool!

I was aware about the crate and tried to use, but apparently in wrong way. Thank you!