this post was submitted on 17 Apr 2026
58 points (98.3% liked)
Rust
8279 readers
6 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
cfg_select!looks good.cfg_if!always added so much boilerplate that it rarely reduced complexity, even though it offered a valid solution for when you had a complex condition in one branch and thennot()that in the other. It was also annoying that you had to add a dependency for those rare cases.We did also move away from
cfg_if!, though, because IDE tooling would mostly just quit working within thecfg_if!macro call. Will have to see, if that's better with this compiler built-in, or if the IDE tooling gets updated to support that well.