Skip to content

Commit 9b80a6d

Browse files
Speed up execution a bit by removing some walks
1 parent 9f70bdc commit 9b80a6d

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/librustdoc/visit_ast.rs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,26 @@ impl<'a, 'tcx> Visitor<'tcx> for RustdocVisitor<'a, 'tcx> {
451451
}
452452

453453
fn visit_mod(&mut self, _: &hir::Mod<'tcx>, _: Span, _: hir::HirId) {
454-
// handled in `visit_item_inner`
454+
// Handled in `visit_item_inner`
455+
}
456+
457+
fn visit_use(&mut self, _: &hir::UsePath<'tcx>, _: hir::HirId) {
458+
// Handled in `visit_item_inner`
459+
}
460+
461+
fn visit_path(&mut self, _: &hir::Path<'tcx>, _: hir::HirId) {
462+
// Handled in `visit_item_inner`
463+
}
464+
465+
fn visit_label(&mut self, _: &rustc_ast::Label) {
466+
// Unneeded.
467+
}
468+
469+
fn visit_infer(&mut self, _: &hir::InferArg) {
470+
// Unneeded.
471+
}
472+
473+
fn visit_lifetime(&mut self, _: &hir::Lifetime) {
474+
// Unneeded.
455475
}
456476
}

0 commit comments

Comments
 (0)