Expanding #[cfg()] with another predicate: `one()`

While it's true that these sorts of Cargo features don't really work well (which is why there's some work towards providing an alternative kind of crate-feature toggle which is designed to be set to one of a set of values, https://internals.rust-lang.org/t/pre-rfc-mutually-excusive-global-features/19618 I believe is the latest on this), there's maybe some situations with direct --cfg where this sort of exclusivity is also useful?

4 Likes