Skip to content

Commit 5c7ce84

Browse files
Remove unneeded SpanMapVisitor::visit_generics function
1 parent a26cb61 commit 5c7ce84

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/librustdoc/html/render/span_map.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_data_structures::fx::FxHashMap;
55
use rustc_hir::def::{DefKind, Res};
66
use rustc_hir::def_id::DefId;
77
use rustc_hir::intravisit::{self, Visitor};
8-
use rustc_hir::{ExprKind, Generics, HirId, Mod, Node, WherePredicate};
8+
use rustc_hir::{ExprKind, HirId, Mod, Node};
99
use rustc_middle::hir::nested_filter;
1010
use rustc_middle::ty::TyCtxt;
1111
use rustc_span::Span;
@@ -100,18 +100,6 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> {
100100
self.tcx.hir()
101101
}
102102

103-
fn visit_generics(&mut self, g: &'tcx Generics<'tcx>) {
104-
for predicate in g.predicates {
105-
if let WherePredicate::BoundPredicate(w) = predicate {
106-
for bound in w.bounds {
107-
if let Some(trait_ref) = bound.trait_ref() {
108-
self.handle_path(trait_ref.path, None);
109-
}
110-
}
111-
}
112-
}
113-
}
114-
115103
fn visit_path(&mut self, path: &'tcx rustc_hir::Path<'tcx>, _id: HirId) {
116104
self.handle_path(path, None);
117105
intravisit::walk_path(self, path);

0 commit comments

Comments
 (0)