You can actually pass true and false to cfg! macro (and similar) since Rust 1.88.0 (link to stabilisation PR).
true
false
cfg!