@@ -12,7 +12,7 @@ use crate::{Module, ModuleOrUniformRoot, NameBinding, ParentScope, PathResult};
1212use crate :: { ResolutionError , Resolver , Segment , UseError } ;
1313
1414use rustc_ast:: ptr:: P ;
15- use rustc_ast:: visit:: { walk_list, AssocCtxt , BoundKind , FnCtxt , FnKind , Visitor } ;
15+ use rustc_ast:: visit:: { visit_opt , walk_list, AssocCtxt , BoundKind , FnCtxt , FnKind , Visitor } ;
1616use rustc_ast:: * ;
1717use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap } ;
1818use rustc_errors:: { codes:: * , Applicability , DiagArgValue , IntoDiagArg , StashKey } ;
@@ -3286,7 +3286,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
32863286 fn resolve_local ( & mut self , local : & ' ast Local ) {
32873287 debug ! ( "resolving local ({:?})" , local) ;
32883288 // Resolve the type.
3289- walk_list ! ( self , visit_ty, & local. ty) ;
3289+ visit_opt ! ( self , visit_ty, & local. ty) ;
32903290
32913291 // Resolve the initializer.
32923292 if let Some ( ( init, els) ) = local. kind . init_else_opt ( ) {
@@ -3485,8 +3485,8 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
34853485 fn resolve_arm ( & mut self , arm : & ' ast Arm ) {
34863486 self . with_rib ( ValueNS , RibKind :: Normal , |this| {
34873487 this. resolve_pattern_top ( & arm. pat , PatternSource :: Match ) ;
3488- walk_list ! ( this, visit_expr, & arm. guard) ;
3489- walk_list ! ( this, visit_expr, & arm. body) ;
3488+ visit_opt ! ( this, visit_expr, & arm. guard) ;
3489+ visit_opt ! ( this, visit_expr, & arm. body) ;
34903490 } ) ;
34913491 }
34923492
0 commit comments