diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-11-25 20:46:55 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-12-07 20:29:50 +0100 |
| commit | a9d582f51f547583380f2f2894ae0c799b609a86 (patch) | |
| tree | 816d97734d5ae3375451dba681903eb8ff9cbef5 | |
| parent | eb93d1bedeab64c6f5d661df6a309a5b8a9273ca (diff) | |
| download | rust-a9d582f51f547583380f2f2894ae0c799b609a86.tar.gz rust-a9d582f51f547583380f2f2894ae0c799b609a86.zip | |
Speed up execution a bit by removing some walks
| -rw-r--r-- | src/librustdoc/visit_ast.rs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index fd50e59460d..e03f0b7f4eb 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -250,7 +250,6 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { res, ident, is_glob, - om, please_inline, ) { continue; @@ -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. } } |
