Passing concated arguments to attribute

⚓ Rust    📅 2025-11-20    👤 surdeus    👁️ 15      

surdeus

Warning

This post was published 60 days ago. The information described in this article may have changed.

I want to do something like #[target_feature(enable = ${ concat($($feat),*) })], which should just concatenate all $feats and pass it to target_feature. But it fails due to macros being lazy. Is there some workaround (nightly-only is fine)? Thanks

1 post - 1 participant

Read full topic

🏷️ Rust_feed