Avoid more invocations of hir_crate query.
This commit is contained in:
parent
11491938f8
commit
db9fea508a
41 changed files with 123 additions and 141 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue