diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-04-10 19:07:57 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-04-12 15:22:03 +0300 |
| commit | 7c40a6fb34d29fce69a16b7b65871999ef3d1628 (patch) | |
| tree | ddfe313880b51f543b7e5c753d986007b64963b6 /compiler/rustc_privacy/src/lib.rs | |
| parent | 9be9b5e09ad834e2ba9f2571ca17059e18f89b71 (diff) | |
| download | rust-7c40a6fb34d29fce69a16b7b65871999ef3d1628.tar.gz rust-7c40a6fb34d29fce69a16b7b65871999ef3d1628.zip | |
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.
Diffstat (limited to 'compiler/rustc_privacy/src/lib.rs')
| -rw-r--r-- | compiler/rustc_privacy/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index 089e043d61c..dcebfca08fa 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -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() { |
