diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-05-07 15:23:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-07 15:23:45 +0200 |
| commit | 3346d11f4e8521894377636f145bfc68fad10bea (patch) | |
| tree | 87cbf3de89ee0de2eaf5969d451b6e52b45d871a /src/librustdoc/html | |
| parent | c29f8575acae4b1e533f630b51a639758919911c (diff) | |
| parent | 3bfa2eb9f09035dcd779910b77880252baaf2ef5 (diff) | |
| download | rust-3346d11f4e8521894377636f145bfc68fad10bea.tar.gz rust-3346d11f4e8521894377636f145bfc68fad10bea.zip | |
Rollup merge of #96636 - GuillaumeGomez:fix-jump-to-def-regression, r=notriddle
Fix jump to def regression https://github.com/rust-lang/rust/pull/93803 introduced a regression in the "jump to def" feature. This fixes it. Nice side-effect: it adds a new regression test. :) I also used this opportunity to add documentation about this unstable feature in the rustdoc book. cc ``@cjgillot`` r? ``@notriddle``
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/span_map.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs index b5502309560..1ae888d059d 100644 --- a/src/librustdoc/html/render/span_map.rs +++ b/src/librustdoc/html/render/span_map.rs @@ -5,7 +5,7 @@ use rustc_data_structures::fx::FxHashMap; use rustc_hir::def::{DefKind, Res}; use rustc_hir::def_id::DefId; use rustc_hir::intravisit::{self, Visitor}; -use rustc_hir::{ExprKind, GenericParam, HirId, Mod, Node}; +use rustc_hir::{ExprKind, HirId, Mod, Node}; use rustc_middle::hir::nested_filter; use rustc_middle::ty::TyCtxt; use rustc_span::Span; @@ -100,8 +100,6 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> { self.tcx.hir() } - fn visit_generic_param(&mut self, _: &'tcx GenericParam<'tcx>) {} - fn visit_path(&mut self, path: &'tcx rustc_hir::Path<'tcx>, _id: HirId) { self.handle_path(path, None); intravisit::walk_path(self, path); |
