Auto merge of #88703 - cjgillot:lazymod, r=petrochenkov
Gather module items after lowering. This avoids having a non-local analysis inside lowering. By implementing `hir_module_items` using a visitor, we make sure that iterations and visitors are consistent.
This commit is contained in:
commit
7b5f95270f
14 changed files with 147 additions and 83 deletions
|
@ -52,8 +52,8 @@ rustc_queries! {
|
|||
///
|
||||
/// This can be conveniently accessed by `tcx.hir().visit_item_likes_in_module`.
|
||||
/// Avoid calling this query directly.
|
||||
query hir_module_items(key: LocalDefId) -> &'tcx hir::ModuleItems {
|
||||
eval_always
|
||||
query hir_module_items(key: LocalDefId) -> rustc_middle::hir::ModuleItems {
|
||||
storage(ArenaCacheSelector<'tcx>)
|
||||
desc { |tcx| "HIR module items in `{}`", tcx.def_path_str(key.to_def_id()) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue