2020-04-04 17:15:01 +00:00
|
|
|
- // MIR for `hello` before ConstProp
|
|
|
|
+ // MIR for `hello` after ConstProp
|
|
|
|
|
|
|
|
fn hello() -> () {
|
2022-11-02 14:54:49 -07: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 16:52:06 +01:00
|
|
|
let mut _2: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
|
2020-04-04 17:15:01 +00:00
|
|
|
|
|
|
|
bb0: {
|
2022-11-02 14:54:49 -07: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 16:03:27 -08: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 17:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2021-01-09 16:52:06 +01:00
|
|
|
StorageLive(_2); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
|
2022-04-16 09:27:54 -04:00
|
|
|
_2 = begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
|
2020-04-04 17:15:01 +00:00
|
|
|
// mir::Constant
|
2021-01-09 16:52:06 +01:00
|
|
|
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
|
2022-07-06 10:14:46 -04:00
|
|
|
// + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) }
|
2020-04-04 17:15:01 +00:00
|
|
|
// mir::Constant
|
2021-01-09 16:52:06 +01:00
|
|
|
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
|
2022-05-06 10:58:54 +02:00
|
|
|
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
2020-04-04 17:15:01 +00:00
|
|
|
}
|
2021-01-01 15:38:11 -03:00
|
|
|
|
|
|
|
bb2: {
|
2022-11-02 14:54:49 -07: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 15:38:11 -03:00
|
|
|
}
|
2020-04-04 17:15:01 +00:00
|
|
|
}
|
|
|
|
|