2023-05-01 06:18:41 -05:00
|
|
|
// unit-test: ConstProp
|
|
|
|
// compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
|
2023-06-08 02:18:34 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2019-05-11 10:24:14 -05:00
|
|
|
#[inline(never)]
|
|
|
|
fn foo(_: i32) { }
|
|
|
|
|
2020-07-27 14:22:43 -05:00
|
|
|
// EMIT_MIR switch_int.main.ConstProp.diff
|
2021-11-30 20:54:37 -06:00
|
|
|
// EMIT_MIR switch_int.main.SimplifyConstCondition-after-const-prop.diff
|
2019-05-11 10:24:14 -05:00
|
|
|
fn main() {
|
|
|
|
match 1 {
|
|
|
|
1 => foo(0),
|
|
|
|
_ => foo(-1),
|
|
|
|
}
|
|
|
|
}
|