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:
@@ -515,7 +515,7 @@ impl<'tcx> EmbargoVisitor<'tcx> {
|
||||
let vis = self.tcx.local_visibility(item_id.owner_id.def_id);
|
||||
self.update_macro_reachable_def(item_id.owner_id.def_id, def_kind, vis, defining_mod);
|
||||
}
|
||||
for export in self.tcx.module_reexports(module_def_id) {
|
||||
for export in self.tcx.module_children_reexports(module_def_id) {
|
||||
if export.vis.is_accessible_from(defining_mod, self.tcx)
|
||||
&& let Res::Def(def_kind, def_id) = export.res
|
||||
&& let Some(def_id) = def_id.as_local() {
|
||||
|
||||
Reference in New Issue
Block a user