mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
13 lines
242 B
Rust
13 lines
242 B
Rust
// skip-filecheck
|
|
// 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);
|
|
}
|