Rename cfg_match!
to cfg_select!
by tgross35 · Pull Request #137198 · rust-lang/rust (original) (raw)
That is what I always called the macro myself, in my versions. It's probably the most correct PL theory name for the construct.
cond
is what you get in Rust if you write:
match () { _ if predicate1 => .., _ if predicate2 => .., _ if predicate3 => .., _ => .., }
(That is, as if let .. = .. else if let ..
is to match
, if .. else if ..
is to cond
.)
So it's in that sense that I think cfg_match!
is fine too, as this is a kind of match that's been stripped down that way. But... yes, cfg_cond!
is probably more correct.