@@ -9,7 +9,7 @@ use rustc_hir::def::{Namespace::TypeNS, Res};
99use rustc_hir:: def_id:: { CrateNum , DefId , DefIndex , LocalDefId , CRATE_DEF_INDEX , LOCAL_CRATE } ;
1010use rustc_hir:: HirId ;
1111use rustc_hir:: {
12- intravisit:: { NestedVisitorMap , Visitor } ,
12+ intravisit:: { self , NestedVisitorMap , Visitor } ,
1313 Path ,
1414} ;
1515use rustc_interface:: interface;
@@ -622,7 +622,7 @@ impl<'hir> Visitor<'hir> for EmitIgnoredResolutionErrors<'_, 'hir> {
622622 NestedVisitorMap :: OnlyBodies ( self . hir_map )
623623 }
624624
625- fn visit_path ( & mut self , path : & ' v Path < ' v > , _id : HirId ) {
625+ fn visit_path ( & mut self , path : & ' hir Path < ' _ > , _id : HirId ) {
626626 debug ! ( "visiting path {:?}" , path) ;
627627 if path. res == Res :: Err {
628628 // We have less context here than in rustc_resolve,
@@ -648,7 +648,10 @@ impl<'hir> Visitor<'hir> for EmitIgnoredResolutionErrors<'_, 'hir> {
648648 err. note ( "try running again with `rustc` and you may get a more detailed error" ) ;
649649 err. emit ( ) ;
650650 }
651- // NOTE: this does _not_ visit the path segments
651+ // We could have an outer resolution that succeeded,
652+ // but with generic parameters that failed.
653+ // Recurse into the segments so we catch those too.
654+ intravisit:: walk_path ( self , path) ;
652655 }
653656}
654657
0 commit comments