@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
3
3
use rustc_data_structures:: fx:: { FxHashMap , FxIndexMap } ;
4
4
use rustc_hir:: def:: { DefKind , Res } ;
5
5
use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
6
- use rustc_hir:: intravisit:: { self , Visitor } ;
6
+ use rustc_hir:: intravisit:: { self , Visitor , VisitorExt } ;
7
7
use rustc_hir:: { ExprKind , HirId , Item , ItemKind , Mod , Node , QPath } ;
8
8
use rustc_middle:: hir:: nested_filter;
9
9
use rustc_middle:: ty:: TyCtxt ;
@@ -234,16 +234,13 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
234
234
self . infer_id ( path. hir_id , Some ( id) , path. ident . span ) ;
235
235
}
236
236
237
- if let Some ( qself) = qself. try_as_ambig_ty ( ) {
238
- rustc_ast:: visit:: try_visit!( self . visit_ty( qself) ) ;
239
- }
237
+ rustc_ast:: visit:: try_visit!( self . visit_ty_unambig( qself) ) ;
240
238
self . visit_path_segment ( path) ;
241
239
}
242
240
QPath :: Resolved ( maybe_qself, path) => {
243
241
self . handle_path ( path, true ) ;
244
242
245
- let maybe_qself = maybe_qself. and_then ( |maybe_qself| maybe_qself. try_as_ambig_ty ( ) ) ;
246
- rustc_ast:: visit:: visit_opt!( self , visit_ty, maybe_qself) ;
243
+ rustc_ast:: visit:: visit_opt!( self , visit_ty_unambig, maybe_qself) ;
247
244
if !self . handle_macro ( path. span ) {
248
245
intravisit:: walk_path ( self , path) ;
249
246
}
0 commit comments