rust/tests/mir-opt/const_prop/switch_int.rs
2023-04-06 10:08:07 +01:00

13 lines
284 B
Rust

// ignore-wasm32 compiled with panic=abort by default
#[inline(never)]
fn foo(_: i32) { }
// EMIT_MIR switch_int.main.ConstProp.diff
// EMIT_MIR switch_int.main.SimplifyConstCondition-after-const-prop.diff
fn main() {
match 1 {
1 => foo(0),
_ => foo(-1),
}
}