]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_prop/boolean_identities.rs
Rollup merge of #107194 - xfix:remove-slice-internals-dependency-in-rustc-ast, r...
[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 }