Passing concated arguments to attribute

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

surdeus

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