@@ -405,7 +405,6 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
405
405
if let Res :: Local ( _var_hir_id) = path. res {
406
406
self . add_live_node_for_node ( expr. hir_id , ExprNode ( expr. span , expr. hir_id ) ) ;
407
407
}
408
- intravisit:: walk_expr ( self , expr) ;
409
408
}
410
409
hir:: ExprKind :: Closure ( closure) => {
411
410
// Interesting control flow (for loops can contain labeled
@@ -425,12 +424,10 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
425
424
} ) ) ;
426
425
}
427
426
self . set_captures ( expr. hir_id , call_caps) ;
428
- intravisit:: walk_expr ( self , expr) ;
429
427
}
430
428
431
429
hir:: ExprKind :: Let ( let_expr) => {
432
430
self . add_from_pat ( let_expr. pat ) ;
433
- intravisit:: walk_expr ( self , expr) ;
434
431
}
435
432
436
433
// live nodes required for interesting control flow:
@@ -439,11 +436,9 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
439
436
| hir:: ExprKind :: Loop ( ..)
440
437
| hir:: ExprKind :: Yield ( ..) => {
441
438
self . add_live_node_for_node ( expr. hir_id , ExprNode ( expr. span , expr. hir_id ) ) ;
442
- intravisit:: walk_expr ( self , expr) ;
443
439
}
444
440
hir:: ExprKind :: Binary ( op, ..) if op. node . is_lazy ( ) => {
445
441
self . add_live_node_for_node ( expr. hir_id , ExprNode ( expr. span , expr. hir_id ) ) ;
446
- intravisit:: walk_expr ( self , expr) ;
447
442
}
448
443
449
444
// otherwise, live nodes are not required:
@@ -474,10 +469,9 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
474
469
| hir:: ExprKind :: Type ( ..)
475
470
| hir:: ExprKind :: Err ( _)
476
471
| hir:: ExprKind :: Path ( hir:: QPath :: TypeRelative ( ..) )
477
- | hir:: ExprKind :: Path ( hir:: QPath :: LangItem ( ..) ) => {
478
- intravisit:: walk_expr ( self , expr) ;
479
- }
472
+ | hir:: ExprKind :: Path ( hir:: QPath :: LangItem ( ..) ) => { }
480
473
}
474
+ intravisit:: walk_expr ( self , expr) ;
481
475
}
482
476
}
483
477
0 commit comments