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