@@ -341,9 +341,6 @@ pub trait Visitor<'v>: Sized {
341
341
fn visit_expr ( & mut self , ex : & ' v Expr < ' v > ) {
342
342
walk_expr ( self , ex)
343
343
}
344
- fn visit_let_expr ( & mut self , lex : & ' v Let < ' v > ) {
345
- walk_let_expr ( self , lex)
346
- }
347
344
fn visit_expr_field ( & mut self , field : & ' v ExprField < ' v > ) {
348
345
walk_expr_field ( self , field)
349
346
}
@@ -672,7 +669,7 @@ pub fn walk_pat_field<'v, V: Visitor<'v>>(visitor: &mut V, field: &'v PatField<'
672
669
673
670
pub fn walk_array_len < ' v , V : Visitor < ' v > > ( visitor : & mut V , len : & ' v ArrayLen ) {
674
671
match len {
675
- & ArrayLen :: Infer ( hir_id, _span ) => visitor. visit_id ( hir_id) ,
672
+ ArrayLen :: Infer ( InferArg { hir_id, span : _ } ) => visitor. visit_id ( * hir_id) ,
676
673
ArrayLen :: Body ( c) => visitor. visit_anon_const ( c) ,
677
674
}
678
675
}
@@ -729,7 +726,12 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>)
729
726
ExprKind :: DropTemps ( ref subexpression) => {
730
727
visitor. visit_expr ( subexpression) ;
731
728
}
732
- ExprKind :: Let ( ref let_expr) => visitor. visit_let_expr ( let_expr) ,
729
+ ExprKind :: Let ( Let { span : _, pat, ty, init, is_recovered : _ } ) => {
730
+ // match the visit order in walk_local
731
+ visitor. visit_expr ( init) ;
732
+ visitor. visit_pat ( pat) ;
733
+ walk_list ! ( visitor, visit_ty, ty) ;
734
+ }
733
735
ExprKind :: If ( ref cond, ref then, ref else_opt) => {
734
736
visitor. visit_expr ( cond) ;
735
737
visitor. visit_expr ( then) ;
@@ -806,14 +808,6 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>)
806
808
}
807
809
}
808
810
809
- pub fn walk_let_expr < ' v , V : Visitor < ' v > > ( visitor : & mut V , let_expr : & ' v Let < ' v > ) {
810
- // match the visit order in walk_local
811
- visitor. visit_expr ( let_expr. init ) ;
812
- visitor. visit_id ( let_expr. hir_id ) ;
813
- visitor. visit_pat ( let_expr. pat ) ;
814
- walk_list ! ( visitor, visit_ty, let_expr. ty) ;
815
- }
816
-
817
811
pub fn walk_expr_field < ' v , V : Visitor < ' v > > ( visitor : & mut V , field : & ' v ExprField < ' v > ) {
818
812
visitor. visit_id ( field. hir_id ) ;
819
813
visitor. visit_ident ( field. ident ) ;
0 commit comments