@@ -205,22 +205,7 @@ struct
205
205
let module M = UB. M in
206
206
let module MS = (val M. make span) in
207
207
match expr.e with
208
- | Loop
209
- {
210
- body;
211
- kind = ForLoop { it; pat; _ };
212
- state = Some _ as state;
213
- control_flow;
214
- _;
215
- }
216
- | Loop
217
- {
218
- body;
219
- kind = ForLoop { it; pat; _ };
220
- state;
221
- control_flow = Some (BreakOrReturn , _) as control_flow;
222
- _;
223
- } ->
208
+ | Loop { body; kind = ForLoop { it; pat; _ } ; state; control_flow; _ } ->
224
209
let bpat, init =
225
210
match state with
226
211
| Some { bpat; init; _ } -> (dpat bpat, dexpr init)
@@ -264,22 +249,8 @@ struct
264
249
(fold, [ it; init; fn ])
265
250
in
266
251
UB. call f args span (dty span expr.typ)
267
- | Loop
268
- {
269
- body;
270
- kind = WhileLoop { condition; _ };
271
- state = Some _ as state;
272
- control_flow;
273
- _;
274
- }
275
- | Loop
276
- {
277
- body;
278
- kind = WhileLoop { condition; _ };
279
- state;
280
- control_flow = Some (BreakOrReturn , _) as control_flow;
281
- _;
282
- } ->
252
+ | Loop { body; kind = WhileLoop { condition; _ }; state; control_flow; _ }
253
+ ->
283
254
let bpat, init =
284
255
match state with
285
256
| Some { bpat; init; _ } -> (dpat bpat, dexpr init)
@@ -345,9 +316,6 @@ struct
345
316
UB. call fold_operator
346
317
[ condition; invariant; variant; init; body ]
347
318
span (dty span expr.typ)
348
- | Loop { state = None ; _ } ->
349
- Error. unimplemented ~issue_id: 405 ~details: " Loop without mutation"
350
- span
351
319
| Loop _ ->
352
320
Error. unimplemented ~issue_id: 933 ~details: " Unhandled loop kind" span
353
321
| [% inline_arms " dexpr'.*" - Loop - Break - Continue - Return ] ->
0 commit comments