rust/tests/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.panic-unwind.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
568 B
Diff
Raw Normal View History

2020-04-04 17:15:01 +00:00
- // MIR for `hello` before ConstProp
+ // MIR for `hello` after ConstProp
fn hello() -> () {
2023-06-06 09:47:00 -04:00
let mut _0: ();
let mut _1: bool;
let mut _2: !;
2020-04-04 17:15:01 +00:00
bb0: {
2023-06-06 09:47:00 -04:00
StorageLive(_1);
2023-02-08 18:54:34 +00:00
- _1 = const _;
2023-06-06 09:47:00 -04:00
- switchInt(move _1) -> [0: bb2, otherwise: bb1];
2023-02-08 18:54:34 +00:00
+ _1 = const false;
2023-06-06 09:47:00 -04:00
+ switchInt(const false) -> [0: bb2, otherwise: bb1];
2020-04-04 17:15:01 +00:00
}
bb1: {
2023-06-23 17:53:09 +01:00
_2 = begin_panic::<&str>(const "explicit panic") -> unwind continue;
2020-04-04 17:15:01 +00:00
}
2021-01-01 15:38:11 -03:00
bb2: {
2023-06-06 09:47:00 -04:00
StorageDead(_1);
return;
2021-01-01 15:38:11 -03:00
}
2020-04-04 17:15:01 +00:00
}