@@ -53,10 +53,11 @@ fn main() {
53
53
// bb0: {
54
54
// ...
55
55
// _2 = std::option::Option<i32>::Some(const 42i32,);
56
- // _3 = discriminant(_2);
57
- // _4 = &(promoted[1]: std::option::Option<i32>);
58
- // _9 = discriminant(_2);
59
- // switchInt(move _9) -> [0isize: bb5, 1isize: bb3, otherwise: bb7];
56
+ // FakeRead(ForMatchedPlace, _2);
57
+ // _7 = discriminant(_2);
58
+ // _9 = &shallow (promoted[2]: std::option::Option<i32>);
59
+ // _10 = &(((promoted[1]: std::option::Option<i32>) as Some).0: i32);
60
+ // switchInt(move _7) -> [0isize: bb5, 1isize: bb3, otherwise: bb7];
60
61
// }
61
62
// bb1: {
62
63
// resume;
@@ -66,15 +67,18 @@ fn main() {
66
67
// goto -> bb13;
67
68
// }
68
69
// bb3: { // binding3(empty) and arm3
69
- // FakeRead(ForMatch, _4);
70
+ // FakeRead(ForMatchGuard, _9);
71
+ // FakeRead(ForMatchGuard, _10);
70
72
// falseEdges -> [real: bb8, imaginary: bb4]; //pre_binding1
71
73
// }
72
74
// bb4: {
73
- // FakeRead(ForMatch, _4);
75
+ // FakeRead(ForMatchGuard, _9);
76
+ // FakeRead(ForMatchGuard, _10);
74
77
// falseEdges -> [real: bb12, imaginary: bb5]; //pre_binding2
75
78
// }
76
79
// bb5: {
77
- // FakeRead(ForMatch, _4);
80
+ // FakeRead(ForMatchGuard, _9);
81
+ // FakeRead(ForMatchGuard, _10);
78
82
// falseEdges -> [real: bb2, imaginary: bb6]; //pre_binding3
79
83
// }
80
84
// bb6: {
@@ -84,31 +88,31 @@ fn main() {
84
88
// unreachable;
85
89
// }
86
90
// bb8: { // binding1 and guard
87
- // StorageLive(_7 );
88
- // _7 = &(((promoted[0]: std::option::Option<i32>) as Some).0: i32);
89
- // StorageLive(_10 );
90
- // _10 = const guard() -> [return: bb9, unwind: bb1];
91
+ // StorageLive(_5 );
92
+ // _5 = &(((promoted[0]: std::option::Option<i32>) as Some).0: i32);
93
+ // StorageLive(_8 );
94
+ // _8 = const guard() -> [return: bb9, unwind: bb1];
91
95
// }
92
96
// bb9: {
93
- // switchInt(move _10 ) -> [false: bb10, otherwise: bb11];
97
+ // switchInt(move _8 ) -> [false: bb10, otherwise: bb11];
94
98
// }
95
99
// bb10: { // to pre_binding2
96
100
// falseEdges -> [real: bb4, imaginary: bb4];
97
101
// }
98
102
// bb11: { // bindingNoLandingPads.before.mir2 and arm2
99
- // StorageLive(_5 );
100
- // _5 = ((_2 as Some).0: i32);
103
+ // StorageLive(_3 );
104
+ // _3 = ((_2 as Some).0: i32);
101
105
// StorageLive(_11);
102
- // _11 = _5 ;
106
+ // _11 = _3 ;
103
107
// _1 = (const 1i32, move _11);
104
108
// StorageDead(_11);
105
109
// goto -> bb13;
106
110
// }
107
111
// bb12: {
108
- // StorageLive(_8 );
109
- // _8 = ((_2 as Some).0: i32);
112
+ // StorageLive(_6 );
113
+ // _6 = ((_2 as Some).0: i32);
110
114
// StorageLive(_12);
111
- // _12 = _8 ;
115
+ // _12 = _6 ;
112
116
// _1 = (const 2i32, move_12);
113
117
// StorageDead(_12);
114
118
// goto -> bb13;
@@ -123,10 +127,11 @@ fn main() {
123
127
// bb0: {
124
128
// ...
125
129
// _2 = std::option::Option<i32>::Some(const 42i32,);
126
- // _3 = discriminant(_2);
127
- // _4 = &_2;
128
- // _9 = discriminant(_2);
129
- // switchInt(move _9) -> [0isize: bb4, 1isize: bb3, otherwise: bb7];
130
+ // FakeRead(ForMatchedPlace, _2);
131
+ // _7 = discriminant(_2);
132
+ // _9 = &shallow _2;
133
+ // _10 = &((_2 as Some).0: i32);
134
+ // switchInt(move _7) -> [0isize: bb4, 1isize: bb3, otherwise: bb7];
130
135
// }
131
136
// bb1: {
132
137
// resume;
@@ -136,15 +141,18 @@ fn main() {
136
141
// goto -> bb13;
137
142
// }
138
143
// bb3: {
139
- // FakeRead(ForMatch, _4);
144
+ // FakeRead(ForMatchGuard, _9);
145
+ // FakeRead(ForMatchGuard, _10);
140
146
// falseEdges -> [real: bb8, imaginary: bb4]; //pre_binding1
141
147
// }
142
148
// bb4: {
143
- // FakeRead(ForMatch, _4);
149
+ // FakeRead(ForMatchGuard, _9);
150
+ // FakeRead(ForMatchGuard, _10);
144
151
// falseEdges -> [real: bb2, imaginary: bb5]; //pre_binding2
145
152
// }
146
153
// bb5: {
147
- // FakeRead(ForMatch, _4);
154
+ // FakeRead(ForMatchGuard, _9);
155
+ // FakeRead(ForMatchGuard, _10);
148
156
// falseEdges -> [real: bb12, imaginary: bb6]; //pre_binding3
149
157
// }
150
158
// bb6: {
@@ -154,31 +162,31 @@ fn main() {
154
162
// unreachable;
155
163
// }
156
164
// bb8: { // binding1 and guard
157
- // StorageLive(_7 );
158
- // _7 = &((_2 as Some).0: i32);
159
- // StorageLive(_10 );
160
- // _10 = const guard() -> [return: bb9, unwind: bb1];
165
+ // StorageLive(_5 );
166
+ // _5 = &((_2 as Some).0: i32);
167
+ // StorageLive(_8 );
168
+ // _8 = const guard() -> [return: bb9, unwind: bb1];
161
169
// }
162
170
// bb9: { // end of guard
163
- // switchInt(move _10 ) -> [false: bb10, otherwise: bb11];
171
+ // switchInt(move _8 ) -> [false: bb10, otherwise: bb11];
164
172
// }
165
173
// bb10: { // to pre_binding3 (can skip 2 since this is `Some`)
166
174
// falseEdges -> [real: bb5, imaginary: bb4];
167
175
// }
168
176
// bb11: { // arm1
169
- // StorageLive(_5 );
170
- // _5 = ((_2 as Some).0: i32);
177
+ // StorageLive(_3 );
178
+ // _3 = ((_2 as Some).0: i32);
171
179
// StorageLive(_11);
172
- // _11 = _5 ;
180
+ // _11 = _3 ;
173
181
// _1 = (const 1i32, move _11);
174
182
// StorageDead(_11);
175
183
// goto -> bb13;
176
184
// }
177
185
// bb12: { // binding3 and arm3
178
- // StorageLive(_8 );
179
- // _8 = ((_2 as Some).0: i32);
186
+ // StorageLive(_6 );
187
+ // _6 = ((_2 as Some).0: i32);
180
188
// StorageLive(_12);
181
- // _12 = _8 ;
189
+ // _12 = _6 ;
182
190
// _1 = (const 2i32, move _12);
183
191
// StorageDead(_12);
184
192
// goto -> bb13;
@@ -193,81 +201,86 @@ fn main() {
193
201
// bb0: {
194
202
// ...
195
203
// _2 = std::option::Option<i32>::Some(const 1i32,);
196
- // _3 = discriminant(_2);
197
- // _4 = &_2;
198
- // _13 = discriminant(_2);
199
- // switchInt(move _13) -> [1isize: bb2, otherwise: bb3];
204
+ // FakeRead(ForMatchedPlace, _2);
205
+ // _11 = discriminant(_2);
206
+ // _16 = &shallow _2;
207
+ // _17 = &((_2 as Some).0: i32);
208
+ // switchInt(move _11) -> [1isize: bb2, otherwise: bb3];
200
209
// }
201
210
// bb1: {
202
211
// resume;
203
212
// }
204
213
// bb2: {
205
- // FakeRead(ForMatch, _4);
214
+ // FakeRead(ForMatchGuard, _16);
215
+ // FakeRead(ForMatchGuard, _17);
206
216
// falseEdges -> [real: bb7, imaginary: bb3]; //pre_binding1
207
217
// }
208
218
// bb3: {
209
- // FakeRead(ForMatch, _4);
219
+ // FakeRead(ForMatchGuard, _16);
220
+ // FakeRead(ForMatchGuard, _17);
210
221
// falseEdges -> [real: bb11, imaginary: bb4]; //pre_binding2
211
222
// }
212
223
// bb4: {
213
- // FakeRead(ForMatch, _4);
224
+ // FakeRead(ForMatchGuard, _16);
225
+ // FakeRead(ForMatchGuard, _17);
214
226
// falseEdges -> [real: bb12, imaginary: bb5]; //pre_binding3
215
227
// }
216
228
// bb5: {
217
- // FakeRead(ForMatch, _4);
229
+ // FakeRead(ForMatchGuard, _16);
230
+ // FakeRead(ForMatchGuard, _17);
218
231
// falseEdges -> [real: bb16, imaginary: bb6]; //pre_binding4
219
232
// }
220
233
// bb6: {
221
234
// unreachable;
222
235
// }
223
236
// bb7: { // binding1: Some(w) if guard()
224
- // StorageLive(_7 );
225
- // _7 = &((_2 as Some).0: i32);
226
- // StorageLive(_14 );
227
- // _14 = const guard() -> [return: bb8, unwind: bb1];
237
+ // StorageLive(_5 );
238
+ // _5 = &((_2 as Some).0: i32);
239
+ // StorageLive(_12 );
240
+ // _12 = const guard() -> [return: bb8, unwind: bb1];
228
241
// }
229
242
// bb8: { //end of guard
230
- // switchInt(move _14 ) -> [false: bb9, otherwise: bb10];
243
+ // switchInt(move _12 ) -> [false: bb9, otherwise: bb10];
231
244
// }
232
245
// bb9: { // to pre_binding2
233
246
// falseEdges -> [real: bb3, imaginary: bb3];
234
247
// }
235
248
// bb10: { // set up bindings for arm1
236
- // StorageLive(_5 );
237
- // _5 = ((_2 as Some).0: i32);
249
+ // StorageLive(_3 );
250
+ // _3 = ((_2 as Some).0: i32);
238
251
// _1 = const 1i32;
239
252
// goto -> bb17;
240
253
// }
241
254
// bb11: { // binding2 & arm2
242
- // StorageLive(_8 );
243
- // _8 = _2;
255
+ // StorageLive(_6 );
256
+ // _6 = _2;
244
257
// _1 = const 2i32;
245
258
// goto -> bb17;
246
259
// }
247
260
// bb12: { // binding3: Some(y) if guard2(y)
248
- // StorageLive(_11 );
249
- // _11 = &((_2 as Some).0: i32);
250
- // StorageLive(_16 );
251
- // StorageLive(_17 );
252
- // _17 = (*_11 );
253
- // _16 = const guard2(move _17 ) -> [return: bb13, unwind: bb1];
261
+ // StorageLive(_9 );
262
+ // _9 = &((_2 as Some).0: i32);
263
+ // StorageLive(_14 );
264
+ // StorageLive(_15 );
265
+ // _15 = (*_9 );
266
+ // _14 = const guard2(move _15 ) -> [return: bb13, unwind: bb1];
254
267
// }
255
268
// bb13: { // end of guard2
256
- // StorageDead(_17 );
257
- // switchInt(move _16 ) -> [false: bb14, otherwise: bb15];
269
+ // StorageDead(_15 );
270
+ // switchInt(move _14 ) -> [false: bb14, otherwise: bb15];
258
271
// }
259
272
// bb14: { // to pre_binding4
260
273
// falseEdges -> [real: bb5, imaginary: bb5];
261
274
// }
262
275
// bb15: { // set up bindings for arm3
263
- // StorageLive(_9 );
264
- // _9 = ((_2 as Some).0: i32);
276
+ // StorageLive(_7 );
277
+ // _7 = ((_2 as Some).0: i32);
265
278
// _1 = const 3i32;
266
279
// goto -> bb17;
267
280
// }
268
281
// bb16: { // binding4 & arm4
269
- // StorageLive(_12 );
270
- // _12 = _2;
282
+ // StorageLive(_10 );
283
+ // _10 = _2;
271
284
// _1 = const 4i32;
272
285
// goto -> bb17;
273
286
// }
0 commit comments