rust/src/test/mir-opt/const_prop/discriminant.rs

8 lines
174 B
Rust
Raw Normal View History

// compile-flags: -O
// EMIT_MIR_FOR_EACH_BIT_WIDTH
2020-04-04 12:15:01 -05:00
// EMIT_MIR rustc.main.ConstProp.diff
fn main() {
let x = (if let Some(true) = Some(true) { 42 } else { 10 }) + 0;
}