rustc: Make the export_map of TyCtxt private
This map, like `trait_map`, is calculated in resolve, but we want to be sure to track it for incremental compliation. Hide it behind a query to get more refactorings later.
This commit is contained in:
@@ -325,8 +325,9 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
|
||||
// This code is here instead of in visit_item so that the
|
||||
// crate module gets processed as well.
|
||||
if self.prev_level.is_some() {
|
||||
if let Some(exports) = self.tcx.export_map.get(&id) {
|
||||
for export in exports {
|
||||
let hir_id = self.tcx.hir.node_to_hir_id(id);
|
||||
if let Some(exports) = self.tcx.module_exports(hir_id) {
|
||||
for export in exports.iter() {
|
||||
if let Some(node_id) = self.tcx.hir.as_local_node_id(export.def.def_id()) {
|
||||
self.update(node_id, Some(AccessLevel::Exported));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user