fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1- // MIR for `main` before UnreachablePropagation 2+ // MIR for `main` after UnreachablePropagation 3 4 fn main() -> () { 5 let mut _0: (); // return place in scope 0 at $DIR/unreachable_diverging.rs:12:11: 12:11 6 let _1: bool; // in scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10 7 let mut _2: std::option::Option<Empty>; // in scope 0 at $DIR/unreachable_diverging.rs:14:25: 14:32 8 let mut _3: isize; // in scope 0 at $DIR/unreachable_diverging.rs:14:12: 14:22 9 let _5: (); // in scope 0 at $DIR/unreachable_diverging.rs:15:9: 17:10 10 let mut _6: bool; // in scope 0 at $DIR/unreachable_diverging.rs:15:12: 15:13 11 let mut _7: !; // in scope 0 at $DIR/unreachable_diverging.rs:18:9: 18:22 12 scope 1 { 13 debug x => _1; // in scope 1 at $DIR/unreachable_diverging.rs:13:9: 13:10 14 let _4: Empty; // in scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21 15 scope 2 { 16 debug bomb => _4; // in scope 2 at $DIR/unreachable_diverging.rs:14:17: 14:21 17 } 18 } 19 20 bb0: { 21 StorageLive(_1); // bb0[0]: scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10 22 _1 = const true; // bb0[1]: scope 0 at $DIR/unreachable_diverging.rs:13:13: 13:17 23 // ty::Const 24 // + ty: bool 25 // + val: Value(Scalar(0x01)) 26 // mir::Constant 27 // + span: $DIR/unreachable_diverging.rs:13:13: 13:17 28 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } 29 StorageLive(_2); // bb0[2]: scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32 30 _2 = const empty() -> bb1; // bb0[3]: scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32 31 // ty::Const 32 // + ty: fn() -> std::option::Option<Empty> {empty} 33 // + val: Value(Scalar(<ZST>)) 34 // mir::Constant 35 // + span: $DIR/unreachable_diverging.rs:14:25: 14:30 36 // + literal: Const { ty: fn() -> std::option::Option<Empty> {empty}, val: Value(Scalar(<ZST>)) } 37 } 38 39 bb1: { 40 _3 = discriminant(_2); // bb1[0]: scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22 41 switchInt(move _3) -> [1isize: bb3, otherwise: bb2]; // bb1[1]: scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22 42 } 43 44 bb2: { 45 _0 = const (); // bb2[0]: scope 1 at $DIR/unreachable_diverging.rs:14:5: 19:6 46 // ty::Const 47 // + ty: () 48 // + val: Value(Scalar(<ZST>)) 49 // mir::Constant 50 // + span: $DIR/unreachable_diverging.rs:14:5: 19:6 51 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 52 StorageDead(_1); // bb2[1]: scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2 53 StorageDead(_2); // bb2[2]: scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2 54 return; // bb2[3]: scope 0 at $DIR/unreachable_diverging.rs:20:2: 20:2 55 } 56 57 bb3: { 58 StorageLive(_4); // bb3[0]: scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21 59 _4 = move ((_2 as Some).0: Empty); // bb3[1]: scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21 60 StorageLive(_5); // bb3[2]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 61 StorageLive(_6); // bb3[3]: scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13 62 _6 = _1; // bb3[4]: scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13 63- switchInt(_6) -> [false: bb4, otherwise: bb5]; // bb3[5]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 64+ goto -> bb4; // bb3[5]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 65 } 66 67 bb4: { 68- _5 = const (); // bb4[0]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 69+ _5 = const loop_forever() -> bb5; // bb4[0]: scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27 70 // ty::Const 71- // + ty: () 72- // + val: Value(Scalar(<ZST>)) 73- // mir::Constant 74- // + span: $DIR/unreachable_diverging.rs:15:9: 17:10 75- // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 76- goto -> bb6; // bb4[1]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 77- } 78- 79- bb5: { 80- _5 = const loop_forever() -> bb6; // bb5[0]: scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27 81- // ty::Const 82 // + ty: fn() {loop_forever} 83 // + val: Value(Scalar(<ZST>)) 84 // mir::Constant 85 // + span: $DIR/unreachable_diverging.rs:16:13: 16:25 86 // + literal: Const { ty: fn() {loop_forever}, val: Value(Scalar(<ZST>)) } 87 } 88 89- bb6: { 90- StorageDead(_6); // bb6[0]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 91- StorageDead(_5); // bb6[1]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 92- StorageLive(_7); // bb6[2]: scope 2 at $DIR/unreachable_diverging.rs:18:9: 18:22 93- unreachable; // bb6[3]: scope 2 at $DIR/unreachable_diverging.rs:18:15: 18:19 94+ bb5: { 95+ StorageDead(_6); // bb5[0]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 96+ StorageDead(_5); // bb5[1]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 97+ StorageLive(_7); // bb5[2]: scope 2 at $DIR/unreachable_diverging.rs:18:9: 18:22 98+ unreachable; // bb5[3]: scope 2 at $DIR/unreachable_diverging.rs:18:15: 18:19 99 } 100 } 101