rust/tests/mir-opt/const_prop/boolean_identities.rs
2023-01-11 09:32:08 +00:00

12 lines
224 B
Rust

// unit-test: ConstProp
// compile-flags: -O -Zmir-opt-level=4
// EMIT_MIR boolean_identities.test.ConstProp.diff
pub fn test(x: bool, y: bool) -> bool {
(y | true) & (x & false)
}
fn main() {
test(true, false);
}