]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff
Introduce GeneratorWitnessMIR.
[rust.git] / tests / mir-opt / uninhabited_enum_branching.main.UninhabitedEnumBranching.diff
1 - // MIR for `main` before UninhabitedEnumBranching
2 + // MIR for `main` after UninhabitedEnumBranching
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/uninhabited_enum_branching.rs:+0:11: +0:11
6       let _1: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6
7       let mut _2: Test1;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
8       let mut _3: isize;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+2:9: +2:20
9       let _4: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+3:24: +3:34
10       let _5: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
11       let _6: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6
12       let mut _7: Test2;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
13       let mut _8: isize;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+8:9: +8:17
14       let _9: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
15   
16       bb0: {
17           StorageLive(_1);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6
18           StorageLive(_2);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
19           Deinit(_2);                      // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
20           discriminant(_2) = 2;            // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
21           _3 = discriminant(_2);           // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
22 -         switchInt(move _3) -> [0: bb3, 1: bb4, 2: bb1, otherwise: bb2]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +1:19
23 +         switchInt(move _3) -> [2: bb1, otherwise: bb2]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +1:19
24       }
25   
26       bb1: {
27           StorageLive(_5);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
28           _5 = const "C";                  // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
29                                            // mir::Constant
30                                            // + span: $DIR/uninhabited_enum_branching.rs:23:21: 23:24
31                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
32           _1 = &(*_5);                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
33           StorageDead(_5);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:23: +4:24
34           goto -> bb5;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:23: +4:24
35       }
36   
37       bb2: {
38           unreachable;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
39       }
40   
41       bb3: {
42           _1 = const "A(Empty)";           // scope 0 at $DIR/uninhabited_enum_branching.rs:+2:24: +2:34
43                                            // mir::Constant
44                                            // + span: $DIR/uninhabited_enum_branching.rs:21:24: 21:34
45                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
46           goto -> bb5;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+2:24: +2:34
47       }
48   
49       bb4: {
50           StorageLive(_4);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+3:24: +3:34
51           _4 = const "B(Empty)";           // scope 0 at $DIR/uninhabited_enum_branching.rs:+3:24: +3:34
52                                            // mir::Constant
53                                            // + span: $DIR/uninhabited_enum_branching.rs:22:24: 22:34
54                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
55           _1 = &(*_4);                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+3:24: +3:34
56           StorageDead(_4);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+3:33: +3:34
57           goto -> bb5;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+3:33: +3:34
58       }
59   
60       bb5: {
61           StorageDead(_2);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7
62           StorageDead(_1);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7
63           StorageLive(_6);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6
64           StorageLive(_7);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
65           Deinit(_7);                      // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
66           discriminant(_7) = 0;            // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
67           _8 = discriminant(_7);           // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
68           switchInt(move _8) -> [4: bb8, 5: bb6, otherwise: bb7]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +7:19
69       }
70   
71       bb6: {
72           StorageLive(_9);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
73           _9 = const "E";                  // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
74                                            // mir::Constant
75                                            // + span: $DIR/uninhabited_enum_branching.rs:28:21: 28:24
76                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
77           _6 = &(*_9);                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
78           StorageDead(_9);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24
79           goto -> bb9;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24
80       }
81   
82       bb7: {
83           unreachable;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
84       }
85   
86       bb8: {
87           _6 = const "D";                  // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24
88                                            // mir::Constant
89                                            // + span: $DIR/uninhabited_enum_branching.rs:27:21: 27:24
90                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
91           goto -> bb9;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24
92       }
93   
94       bb9: {
95           StorageDead(_7);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7
96           StorageDead(_6);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7
97           _0 = const ();                   // scope 0 at $DIR/uninhabited_enum_branching.rs:+0:11: +11:2
98           return;                          // scope 0 at $DIR/uninhabited_enum_branching.rs:+11:2: +11:2
99       }
100   }
101