How does the Rust compiler analyze, diagnose and optimize if
-expressions that are compile-time constants. For instance such as in
https://github.com/Wilfred/remacs/blob/master/rust_src/build.rs#L27
?
In D, static if
should have been used instead. And the D compilers warn when the if
-expression is a compile-time constant (D enum
).