Skip to content

Commit

Permalink
Speed up execution a bit by removing some walks
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 7, 2022
1 parent eb93d1b commit a9d582f
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/librustdoc/visit_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
res,
ident,
is_glob,
om,
please_inline,
) {
continue;
Expand Down Expand Up @@ -446,6 +445,26 @@ impl<'a, 'tcx> Visitor<'tcx> for RustdocVisitor<'a, 'tcx> {
}

fn visit_mod(&mut self, _: &hir::Mod<'tcx>, _: Span, _: hir::HirId) {
// handled in `visit_item_inner`
// Handled in `visit_item_inner`
}

fn visit_use(&mut self, _: &hir::UsePath<'tcx>, _: hir::HirId) {
// Handled in `visit_item_inner`
}

fn visit_path(&mut self, _: &hir::Path<'tcx>, _: hir::HirId) {
// Handled in `visit_item_inner`
}

fn visit_label(&mut self, _: &rustc_ast::Label) {
// Unneeded.
}

fn visit_infer(&mut self, _: &hir::InferArg) {
// Unneeded.
}

fn visit_lifetime(&mut self, _: &hir::Lifetime) {
// Unneeded.
}
}

0 comments on commit a9d582f

Please sign in to comment.