2020-04-04 12:15:01 -05:00
|
|
|
- // MIR for `hello` before ConstProp
|
|
|
|
+ // MIR for `hello` after ConstProp
|
|
|
|
|
|
|
|
fn hello() -> () {
|
2022-11-02 16:54:49 -05:00
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/control_flow_simplification.rs:+0:14: +0:14
|
|
|
|
let mut _1: bool; // in scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
|
2021-01-09 09:52:06 -06:00
|
|
|
let mut _2: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
|
2020-04-04 12:15:01 -05:00
|
|
|
|
|
|
|
bb0: {
|
2022-11-02 16:54:49 -05:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
|
|
|
|
_1 = const _; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
|
2022-12-03 18:03:27 -06:00
|
|
|
- switchInt(move _1) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
|
|
|
|
+ switchInt(const false) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2021-01-09 09:52:06 -06:00
|
|
|
StorageLive(_2); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
|
2022-04-16 08:27:54 -05:00
|
|
|
_2 = begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
|
2020-04-04 12:15:01 -05:00
|
|
|
// mir::Constant
|
2021-01-09 09:52:06 -06:00
|
|
|
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) }
|
2020-04-04 12:15:01 -05:00
|
|
|
// mir::Constant
|
2021-01-09 09:52:06 -06:00
|
|
|
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
|
2022-05-06 03:58:54 -05:00
|
|
|
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
2021-01-01 12:38:11 -06:00
|
|
|
|
|
|
|
bb2: {
|
2022-11-02 16:54:49 -05:00
|
|
|
StorageDead(_1); // scope 0 at $DIR/control_flow_simplification.rs:+3:5: +3:6
|
|
|
|
return; // scope 0 at $DIR/control_flow_simplification.rs:+4:2: +4:2
|
2021-01-01 12:38:11 -06:00
|
|
|
}
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|