about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-05-06 21:54:31 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-05-06 22:01:30 +0200
commit5c7ce84d7409075803bf44bc38d3d212fa83feef (patch)
treeeefb71a6b22ca1a27fe063b521d5d2423f8fd924
parenta26cb6154d3f357fccc15fea5e47ed6a82c9a8f3 (diff)
downloadrust-5c7ce84d7409075803bf44bc38d3d212fa83feef.tar.gz
rust-5c7ce84d7409075803bf44bc38d3d212fa83feef.zip
Remove unneeded SpanMapVisitor::visit_generics function
-rw-r--r--src/librustdoc/html/render/span_map.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs
index 02a52b2f98b..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, Generics, HirId, Mod, Node, WherePredicate};
+use rustc_hir::{ExprKind, HirId, Mod, Node};
 use rustc_middle::hir::nested_filter;
 use rustc_middle::ty::TyCtxt;
 use rustc_span::Span;
@@ -100,18 +100,6 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
         self.tcx.hir()
     }
 
-    fn visit_generics(&mut self, g: &'tcx Generics<'tcx>) {
-        for predicate in g.predicates {
-            if let WherePredicate::BoundPredicate(w) = predicate {
-                for bound in w.bounds {
-                    if let Some(trait_ref) = bound.trait_ref() {
-                        self.handle_path(trait_ref.path, None);
-                    }
-                }
-            }
-        }
-    }
-
     fn visit_path(&mut self, path: &'tcx rustc_hir::Path<'tcx>, _id: HirId) {
         self.handle_path(path, None);
         intravisit::walk_path(self, path);