@@ -199,19 +199,15 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
199199 None ,
200200 Some ( ( Some ( & destination) , initializer_span) ) ,
201201 ) ;
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+ } ) ;
215211 let else_block_span = this. thir [ * else_block] . span ;
216212 let ( matching, failure) =
217213 this. in_if_then_scope ( last_remainder_scope, else_block_span, |this| {
@@ -295,20 +291,16 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
295291 } ) ;
296292
297293 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+ } )
312304 }
313305
314306 // Enter the visibility scope, after evaluating the initializer.
0 commit comments