diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-01-20 16:02:57 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-01-27 14:41:33 +0100 |
| commit | 9b80a6ddf887dcbb2a8932741c6d711b7c475d9c (patch) | |
| tree | 6dfbdb7f7b3a8ae53ba8bad699da3851d6e12746 | |
| parent | 9f70bdcbc88a51f6065dba37e033c2422dd263dc (diff) | |
| download | rust-9b80a6ddf887dcbb2a8932741c6d711b7c475d9c.tar.gz rust-9b80a6ddf887dcbb2a8932741c6d711b7c475d9c.zip | |
Speed up execution a bit by removing some walks
| -rw-r--r-- | src/librustdoc/visit_ast.rs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index 952304d40ec..eccde86ff24 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -451,6 +451,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. } } |
