summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/const_prop/boolean_identities.rs
blob: c7b609949cd15a58a146013fcd4a79f82483b30f (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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);
}