Macro cfg_select
macro cfg_select($($tt:tt)*) {
...
}
Selects code at compile-time based on cfg predicates.
This macro evaluates, at compile-time, a series of cfg predicates,
selects the first that is true, and emits the code guarded by that
predicate. The code guarded by other predicates is not emitted.
An optional trailing _ wildcard can be used to specify a fallback. If
none of the predicates are true, a compile_error is emitted.
Example
cfg_select!
The cfg_select! macro can also be used in expression position, with or without braces on the
right-hand side:
let _some_string = cfg_select! ;