]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/uninhabited_enum_branching2.main.UninhabitedEnumBranching.diff
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / mir-opt / uninhabited_enum_branching2.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_branching2.rs:+0:11: +0:11
6       let _1: Plop;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
7       let mut _2: Test1;                   // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
8       let _3: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+3:5: +8:6
9       let mut _4: &Test1;                  // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
10       let mut _5: isize;                   // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+4:9: +4:20
11       let _6: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
12       let _7: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
13       let _8: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
14       let _9: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+10:5: +15:6
15       let mut _10: isize;                  // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+11:9: +11:20
16       let _11: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
17       let _12: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
18       let _13: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
19       scope 1 {
20           debug plop => _1;                // in scope 1 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
21       }
22   
23       bb0: {
24           StorageLive(_1);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
25           StorageLive(_2);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
26           Deinit(_2);                      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
27           discriminant(_2) = 2;            // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
28           Deinit(_1);                      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
29           (_1.0: u32) = const 51_u32;      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
30           (_1.1: Test1) = move _2;         // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
31           StorageDead(_2);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:47: +1:48
32           StorageLive(_3);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +8:6
33           StorageLive(_4);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
34           _4 = &(_1.1: Test1);             // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
35           _5 = discriminant((*_4));        // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
36 -         switchInt(move _5) -> [0: bb3, 1: bb4, 2: bb5, 3: bb1, otherwise: bb2]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +3:22
37 +         switchInt(move _5) -> [2: bb5, 3: bb1, otherwise: bb2]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +3:22
38       }
39   
40       bb1: {
41           StorageLive(_8);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
42           _8 = const "D";                  // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
43                                            // mir::Constant
44                                            // + span: $DIR/uninhabited_enum_branching2.rs:25:21: 25:24
45                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
46           _3 = &(*_8);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
47           StorageDead(_8);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:23: +7:24
48           goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:23: +7:24
49       }
50   
51       bb2: {
52           unreachable;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
53       }
54   
55       bb3: {
56           _3 = const "A(Empty)";           // scope 1 at $DIR/uninhabited_enum_branching2.rs:+4:24: +4:34
57                                            // mir::Constant
58                                            // + span: $DIR/uninhabited_enum_branching2.rs:22:24: 22:34
59                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
60           goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+4:24: +4:34
61       }
62   
63       bb4: {
64           StorageLive(_6);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
65           _6 = const "B(Empty)";           // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
66                                            // mir::Constant
67                                            // + span: $DIR/uninhabited_enum_branching2.rs:23:24: 23:34
68                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
69           _3 = &(*_6);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
70           StorageDead(_6);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:33: +5:34
71           goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+5:33: +5:34
72       }
73   
74       bb5: {
75           StorageLive(_7);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
76           _7 = const "C";                  // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
77                                            // mir::Constant
78                                            // + span: $DIR/uninhabited_enum_branching2.rs:24:21: 24:24
79                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
80           _3 = &(*_7);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
81           StorageDead(_7);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:23: +6:24
82           goto -> bb6;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:23: +6:24
83       }
84   
85       bb6: {
86           StorageDead(_4);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+8:6: +8:7
87           StorageDead(_3);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+8:6: +8:7
88           StorageLive(_9);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +15:6
89           _10 = discriminant((_1.1: Test1)); // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:11: +10:21
90 -         switchInt(move _10) -> [0: bb9, 1: bb10, 2: bb11, 3: bb7, otherwise: bb8]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +10:21
91 +         switchInt(move _10) -> [2: bb11, 3: bb7, otherwise: bb8]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +10:21
92       }
93   
94       bb7: {
95           StorageLive(_13);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
96           _13 = const "D";                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
97                                            // mir::Constant
98                                            // + span: $DIR/uninhabited_enum_branching2.rs:32:21: 32:24
99                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
100           _9 = &(*_13);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
101           StorageDead(_13);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:23: +14:24
102           goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:23: +14:24
103       }
104   
105       bb8: {
106           unreachable;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:11: +10:21
107       }
108   
109       bb9: {
110           _9 = const "A(Empty)";           // scope 1 at $DIR/uninhabited_enum_branching2.rs:+11:24: +11:34
111                                            // mir::Constant
112                                            // + span: $DIR/uninhabited_enum_branching2.rs:29:24: 29:34
113                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
114           goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+11:24: +11:34
115       }
116   
117       bb10: {
118           StorageLive(_11);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
119           _11 = const "B(Empty)";          // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
120                                            // mir::Constant
121                                            // + span: $DIR/uninhabited_enum_branching2.rs:30:24: 30:34
122                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
123           _9 = &(*_11);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
124           StorageDead(_11);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:33: +12:34
125           goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+12:33: +12:34
126       }
127   
128       bb11: {
129           StorageLive(_12);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
130           _12 = const "C";                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
131                                            // mir::Constant
132                                            // + span: $DIR/uninhabited_enum_branching2.rs:31:21: 31:24
133                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
134           _9 = &(*_12);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
135           StorageDead(_12);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:23: +13:24
136           goto -> bb12;                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:23: +13:24
137       }
138   
139       bb12: {
140           StorageDead(_9);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+15:6: +15:7
141           _0 = const ();                   // scope 0 at $DIR/uninhabited_enum_branching2.rs:+0:11: +16:2
142           StorageDead(_1);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+16:1: +16:2
143           return;                          // scope 0 at $DIR/uninhabited_enum_branching2.rs:+16:2: +16:2
144       }
145   }
146