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