]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_prop/boolean_identities.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / mir-opt / const_prop / boolean_identities.rs
1 // unit-test: ConstProp
2 // compile-flags: -O -Zmir-opt-level=4
3
4 // EMIT_MIR boolean_identities.test.ConstProp.diff
5 pub fn test(x: bool, y: bool) -> bool {
6     (y | true) & (x & false)
7 }
8
9 fn main() {
10     test(true, false);
11 }