summary refs log tree commit diff
path: root/compiler/rustc_interface
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-09-12 01:11:22 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2021-09-29 23:16:47 +0200
commitdb9fea508a6db55075d7851211ea5d4b0485e322 (patch)
tree76dd7a3c95269991994e12a73d020aed197fd592 /compiler/rustc_interface
parent11491938f80988c7261a1179cf71a25c379c8783 (diff)
downloadrust-db9fea508a6db55075d7851211ea5d4b0485e322.tar.gz
rust-db9fea508a6db55075d7851211ea5d4b0485e322.zip
Avoid more invocations of hir_crate query.
Diffstat (limited to 'compiler/rustc_interface')
-rw-r--r--compiler/rustc_interface/src/proc_macro_decls.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/proc_macro_decls.rs b/compiler/rustc_interface/src/proc_macro_decls.rs
index 88cf6275ebb..c0316ce58d2 100644
--- a/compiler/rustc_interface/src/proc_macro_decls.rs
+++ b/compiler/rustc_interface/src/proc_macro_decls.rs
@@ -7,7 +7,7 @@ use rustc_span::symbol::sym;
 
 fn proc_macro_decls_static(tcx: TyCtxt<'_>, (): ()) -> Option<LocalDefId> {
     let mut finder = Finder { tcx, decls: None };
-    tcx.hir().krate().visit_all_item_likes(&mut finder);
+    tcx.hir().visit_all_item_likes(&mut finder);
 
     finder.decls.map(|id| tcx.hir().local_def_id(id))
 }