2022-07-26 19:04:27 +02:00
|
|
|
// unit-test: ConstProp
|
2021-03-04 10:21:13 -03:00
|
|
|
// compile-flags: -O -Zmir-opt-level=4
|
2020-07-19 00:43:51 +02:00
|
|
|
|
2020-07-27 21:22:43 +02:00
|
|
|
// EMIT_MIR boolean_identities.test.ConstProp.diff
|
2020-07-19 00:43:51 +02:00
|
|
|
pub fn test(x: bool, y: bool) -> bool {
|
|
|
|
(y | true) & (x & false)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
test(true, false);
|
|
|
|
}
|