rust/tests/mir-opt/const_prop/boolean_identities.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
242 B
Rust
Raw Normal View History

// skip-filecheck
2022-07-26 12:04:27 -05:00
// unit-test: ConstProp
// compile-flags: -O -Zmir-opt-level=4
2020-07-27 14:22:43 -05:00
// EMIT_MIR boolean_identities.test.ConstProp.diff
pub fn test(x: bool, y: bool) -> bool {
(y | true) & (x & false)
}
fn main() {
test(true, false);
}