]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | - // MIR for `hello` before ConstProp |
2 | + // MIR for `hello` after ConstProp | |
3 | ||
4 | fn hello() -> () { | |
064997fb FG |
5 | let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:+0:14: +0:14 |
6 | let mut _1: bool; // in scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21 | |
5869c6ff | 7 | let mut _2: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL |
ba9703b0 XL |
8 | |
9 | bb0: { | |
064997fb FG |
10 | StorageLive(_1); // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21 |
11 | - _1 = const <bool as NeedsDrop>::NEEDS; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21 | |
12 | - switchInt(move _1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21 | |
13 | + _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21 | |
14 | + switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21 | |
ba9703b0 XL |
15 | } |
16 | ||
17 | bb1: { | |
5869c6ff | 18 | StorageLive(_2); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL |
923072b8 | 19 | _2 = begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL |
ba9703b0 | 20 | // mir::Constant |
5869c6ff | 21 | // + span: $SRC_DIR/std/src/panic.rs:LL:COL |
064997fb | 22 | // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) } |
ba9703b0 | 23 | // mir::Constant |
5869c6ff | 24 | // + span: $SRC_DIR/std/src/panic.rs:LL:COL |
04454e1e | 25 | // + literal: Const { ty: &str, val: Value(Slice(..)) } |
ba9703b0 | 26 | } |
5869c6ff XL |
27 | |
28 | bb2: { | |
064997fb FG |
29 | nop; // scope 0 at $DIR/control-flow-simplification.rs:+3:6: +3:6 |
30 | StorageDead(_1); // scope 0 at $DIR/control-flow-simplification.rs:+3:5: +3:6 | |
31 | return; // scope 0 at $DIR/control-flow-simplification.rs:+4:2: +4:2 | |
5869c6ff | 32 | } |
ba9703b0 XL |
33 | } |
34 |