about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-01-26 21:50:50 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-10 12:00:08 +0200
commit1a6d6363d090961a1efe513d413f5b51ecd81ab8 (patch)
tree359bea9e555d42e953d9de0e4ad315b4e862e7b2
parentf1649a4e4379aa0f5eb1181ca8e04c7790c21e5e (diff)
downloadrust-1a6d6363d090961a1efe513d413f5b51ecd81ab8.tar.gz
rust-1a6d6363d090961a1efe513d413f5b51ecd81ab8.zip
Update to last rustc_hir Visitor changes
-rw-r--r--src/librustdoc/html/render/span_map.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs
index 342cf5073f7..505797ccc0b 100644
--- a/src/librustdoc/html/render/span_map.rs
+++ b/src/librustdoc/html/render/span_map.rs
@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
 use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
 use rustc_hir::def::{DefKind, Res};
 use rustc_hir::def_id::{DefId, LOCAL_CRATE};
-use rustc_hir::intravisit::{self, Visitor};
+use rustc_hir::intravisit::{self, Visitor, VisitorExt};
 use rustc_hir::{ExprKind, HirId, Item, ItemKind, Mod, Node, QPath};
 use rustc_middle::hir::nested_filter;
 use rustc_middle::ty::TyCtxt;
@@ -234,16 +234,13 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
                     self.infer_id(path.hir_id, Some(id), path.ident.span);
                 }
 
-                if let Some(qself) = qself.try_as_ambig_ty() {
-                    rustc_ast::visit::try_visit!(self.visit_ty(qself));
-                }
+                rustc_ast::visit::try_visit!(self.visit_ty_unambig(qself));
                 self.visit_path_segment(path);
             }
             QPath::Resolved(maybe_qself, path) => {
                 self.handle_path(path, true);
 
-                let maybe_qself = maybe_qself.and_then(|maybe_qself| maybe_qself.try_as_ambig_ty());
-                rustc_ast::visit::visit_opt!(self, visit_ty, maybe_qself);
+                rustc_ast::visit::visit_opt!(self, visit_ty_unambig, maybe_qself);
                 if !self.handle_macro(path.span) {
                     intravisit::walk_path(self, path);
                 }