@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
33use rustc_data_structures:: fx:: { FxHashMap , FxIndexMap } ;
44use rustc_hir:: def:: { DefKind , Res } ;
55use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
6- use rustc_hir:: intravisit:: { self , Visitor } ;
6+ use rustc_hir:: intravisit:: { self , Visitor , VisitorExt } ;
77use rustc_hir:: { ExprKind , HirId , Item , ItemKind , Mod , Node , QPath } ;
88use rustc_middle:: hir:: nested_filter;
99use rustc_middle:: ty:: TyCtxt ;
@@ -238,13 +238,13 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
238238 self . infer_id ( path. hir_id , Some ( id) , path. ident . span ) ;
239239 }
240240
241- rustc_ast:: visit:: try_visit!( self . visit_ty ( qself) ) ;
241+ rustc_ast:: visit:: try_visit!( self . visit_ty_unambig ( qself) ) ;
242242 self . visit_path_segment ( path) ;
243243 }
244244 QPath :: Resolved ( maybe_qself, path) => {
245245 self . handle_path ( path, true ) ;
246246
247- rustc_ast:: visit:: visit_opt!( self , visit_ty , maybe_qself) ;
247+ rustc_ast:: visit:: visit_opt!( self , visit_ty_unambig , maybe_qself) ;
248248 if !self . handle_macro ( path. span ) {
249249 intravisit:: walk_path ( self , path) ;
250250 }
0 commit comments