1
Fork 0

resolve: Pre-compute non-reexport module children

Instead of repeating the same logic by walking HIR during metadata encoding.

The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list.
They can be encoded separately if this need ever arises.

`module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
This commit is contained in:
Vadim Petrochenkov 2023-04-10 19:07:57 +03:00
parent 9be9b5e09a
commit 7c40a6fb34
16 changed files with 72 additions and 99 deletions

View file

@ -1516,10 +1516,6 @@ rustc_queries! {
desc { "getting traits in scope at a block" }
}
query module_reexports(def_id: LocalDefId) -> &'tcx [ModChild] {
desc { |tcx| "looking up reexports of module `{}`", tcx.def_path_str(def_id.to_def_id()) }
}
query impl_defaultness(def_id: DefId) -> hir::Defaultness {
desc { |tcx| "looking up whether `{}` is a default impl", tcx.def_path_str(def_id) }
cache_on_disk_if { def_id.is_local() }