diff options
Diffstat (limited to 'src/librustdoc/html/render/span_map.rs')
| -rw-r--r-- | src/librustdoc/html/render/span_map.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs index 06c63ec97d7..b5502309560 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, GenericParamKind, HirId, Mod, Node}; +use rustc_hir::{ExprKind, GenericParam, HirId, Mod, Node}; use rustc_middle::hir::nested_filter; use rustc_middle::ty::TyCtxt; use rustc_span::Span; @@ -100,16 +100,7 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> { self.tcx.hir() } - fn visit_generic_param(&mut self, p: &'tcx GenericParam<'tcx>) { - if !matches!(p.kind, GenericParamKind::Type { .. }) { - return; - } - for bound in p.bounds { - if let Some(trait_ref) = bound.trait_ref() { - self.handle_path(trait_ref.path, None); - } - } - } + 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); |
