Currently this is not supported in stable.
However there is a feature in nightly called concat_idents
:
concat_idents!(my_test_, $id)
See
- Rust docs
- Issue
Update: it seems there aren’t near-term plans to add this into stable releases, see issue.