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

12 lines
224 B
Rust

#[inline(never)]
fn foo(_: i32) { }
// EMIT_MIR switch_int.main.ConstProp.diff
// EMIT_MIR switch_int.main.SimplifyBranches-after-const-prop.diff
fn main() {
match 1 {
1 => foo(0),
_ => foo(-1),
}
}