1 - // MIR for `main` before UnreachablePropagation
2 + // MIR for `main` after UnreachablePropagation
5 let mut _0: (); // return place in scope 0 at $DIR/unreachable.rs:8:11: 8:11
6 let mut _1: std::option::Option<Empty>; // in scope 0 at $DIR/unreachable.rs:9:23: 9:30
7 let mut _2: isize; // in scope 0 at $DIR/unreachable.rs:9:12: 9:20
8 let _3: Empty; // in scope 0 at $DIR/unreachable.rs:9:17: 9:19
9 let _5: (); // in scope 0 at $DIR/unreachable.rs:12:9: 16:10
10 let mut _6: bool; // in scope 0 at $DIR/unreachable.rs:12:12: 12:16
11 let mut _7: !; // in scope 0 at $DIR/unreachable.rs:18:9: 18:21
13 debug _x => _3; // in scope 1 at $DIR/unreachable.rs:9:17: 9:19
14 let mut _4: i32; // in scope 1 at $DIR/unreachable.rs:10:13: 10:19
16 debug _y => _4; // in scope 2 at $DIR/unreachable.rs:10:13: 10:19
21 StorageLive(_1); // bb0[0]: scope 0 at $DIR/unreachable.rs:9:23: 9:30
22 _1 = const empty() -> bb1; // bb0[1]: scope 0 at $DIR/unreachable.rs:9:23: 9:30
24 // + ty: fn() -> std::option::Option<Empty> {empty}
25 // + val: Value(Scalar(<ZST>))
27 // + span: $DIR/unreachable.rs:9:23: 9:28
28 // + literal: Const { ty: fn() -> std::option::Option<Empty> {empty}, val: Value(Scalar(<ZST>)) }
32 _2 = discriminant(_1); // bb1[0]: scope 0 at $DIR/unreachable.rs:9:12: 9:20
33 - switchInt(move _2) -> [1isize: bb3, otherwise: bb2]; // bb1[1]: scope 0 at $DIR/unreachable.rs:9:12: 9:20
34 + goto -> bb2; // bb1[1]: scope 0 at $DIR/unreachable.rs:9:12: 9:20
38 _0 = const (); // bb2[0]: scope 0 at $DIR/unreachable.rs:9:5: 19:6
41 // + val: Value(Scalar(<ZST>))
43 // + span: $DIR/unreachable.rs:9:5: 19:6
44 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
45 StorageDead(_1); // bb2[1]: scope 0 at $DIR/unreachable.rs:20:1: 20:2
46 return; // bb2[2]: scope 0 at $DIR/unreachable.rs:20:2: 20:2
50 - StorageLive(_3); // bb3[0]: scope 0 at $DIR/unreachable.rs:9:17: 9:19
51 - _3 = move ((_1 as Some).0: Empty); // bb3[1]: scope 0 at $DIR/unreachable.rs:9:17: 9:19
52 - StorageLive(_4); // bb3[2]: scope 1 at $DIR/unreachable.rs:10:13: 10:19
53 - StorageLive(_5); // bb3[3]: scope 2 at $DIR/unreachable.rs:12:9: 16:10
54 - StorageLive(_6); // bb3[4]: scope 2 at $DIR/unreachable.rs:12:12: 12:16
55 - _6 = const true; // bb3[5]: scope 2 at $DIR/unreachable.rs:12:12: 12:16
58 - // + val: Value(Scalar(0x01))
60 - // + span: $DIR/unreachable.rs:12:12: 12:16
61 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
62 - switchInt(_6) -> [false: bb4, otherwise: bb5]; // bb3[6]: scope 2 at $DIR/unreachable.rs:12:9: 16:10
66 - _4 = const 42i32; // bb4[0]: scope 2 at $DIR/unreachable.rs:15:13: 15:20
69 - // + val: Value(Scalar(0x0000002a))
71 - // + span: $DIR/unreachable.rs:15:18: 15:20
72 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
73 - _5 = const (); // bb4[1]: scope 2 at $DIR/unreachable.rs:14:16: 16:10
76 - // + val: Value(Scalar(<ZST>))
78 - // + span: $DIR/unreachable.rs:14:16: 16:10
79 - // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
80 - goto -> bb6; // bb4[2]: scope 2 at $DIR/unreachable.rs:12:9: 16:10
84 - _4 = const 21i32; // bb5[0]: scope 2 at $DIR/unreachable.rs:13:13: 13:20
87 - // + val: Value(Scalar(0x00000015))
89 - // + span: $DIR/unreachable.rs:13:18: 13:20
90 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000015)) }
91 - _5 = const (); // bb5[1]: scope 2 at $DIR/unreachable.rs:12:17: 14:10
94 - // + val: Value(Scalar(<ZST>))
96 - // + span: $DIR/unreachable.rs:12:17: 14:10
97 - // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
98 - goto -> bb6; // bb5[2]: scope 2 at $DIR/unreachable.rs:12:9: 16:10
102 - StorageDead(_6); // bb6[0]: scope 2 at $DIR/unreachable.rs:16:9: 16:10
103 - StorageDead(_5); // bb6[1]: scope 2 at $DIR/unreachable.rs:16:9: 16:10
104 - StorageLive(_7); // bb6[2]: scope 2 at $DIR/unreachable.rs:18:9: 18:21
105 - unreachable; // bb6[3]: scope 2 at $DIR/unreachable.rs:18:15: 18:17