@@ -199,19 +199,15 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
199
199
None ,
200
200
Some ( ( Some ( & destination) , initializer_span) ) ,
201
201
) ;
202
- this. visit_primary_bindings (
203
- pattern,
204
- UserTypeProjections :: none ( ) ,
205
- & mut |this, _, _, node, span, _, _| {
206
- this. storage_live_binding (
207
- block,
208
- node,
209
- span,
210
- OutsideGuard ,
211
- ScheduleDrops :: Yes ,
212
- ) ;
213
- } ,
214
- ) ;
202
+ this. visit_primary_bindings_only ( pattern, |this, node, span| {
203
+ this. storage_live_binding (
204
+ block,
205
+ node,
206
+ span,
207
+ OutsideGuard ,
208
+ ScheduleDrops :: Yes ,
209
+ ) ;
210
+ } ) ;
215
211
let else_block_span = this. thir [ * else_block] . span ;
216
212
let ( matching, failure) =
217
213
this. in_if_then_scope ( last_remainder_scope, else_block_span, |this| {
@@ -295,20 +291,16 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
295
291
} ) ;
296
292
297
293
debug ! ( "ast_block_stmts: pattern={:?}" , pattern) ;
298
- this. visit_primary_bindings (
299
- pattern,
300
- UserTypeProjections :: none ( ) ,
301
- & mut |this, _, _, node, span, _, _| {
302
- this. storage_live_binding (
303
- block,
304
- node,
305
- span,
306
- OutsideGuard ,
307
- ScheduleDrops :: Yes ,
308
- ) ;
309
- this. schedule_drop_for_binding ( node, span, OutsideGuard ) ;
310
- } ,
311
- )
294
+ this. visit_primary_bindings_only ( pattern, |this, node, span| {
295
+ this. storage_live_binding (
296
+ block,
297
+ node,
298
+ span,
299
+ OutsideGuard ,
300
+ ScheduleDrops :: Yes ,
301
+ ) ;
302
+ this. schedule_drop_for_binding ( node, span, OutsideGuard ) ;
303
+ } )
312
304
}
313
305
314
306
// Enter the visibility scope, after evaluating the initializer.
0 commit comments