rust/tests/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.panic-unwind.diff
2023-06-23 18:36:25 +01:00

26 lines
540 B
Diff

- // MIR for `hello` before ConstProp
+ // MIR for `hello` after ConstProp
fn hello() -> () {
let mut _0: ();
let mut _1: bool;
let mut _2: !;
bb0: {
StorageLive(_1);
_1 = const _;
- switchInt(move _1) -> [0: bb2, otherwise: bb1];
+ switchInt(const false) -> [0: bb2, otherwise: bb1];
}
bb1: {
_2 = begin_panic::<&str>(const "explicit panic") -> unwind continue;
}
bb2: {
StorageDead(_1);
return;
}
}