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:
parent
32d35e6e9f
commit
942c8dcf19
7 changed files with 33 additions and 10 deletions
|
|
@ -199,8 +199,9 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
|||
self.visit_item(item, None, &mut om);
|
||||
}
|
||||
self.inside_public_path = orig_inside_public_path;
|
||||
if let Some(exports) = self.cx.tcx.export_map.get(&id) {
|
||||
for export in exports {
|
||||
let hir_id = self.cx.tcx.hir.node_to_hir_id(id);
|
||||
if let Some(exports) = self.cx.tcx.module_exports(hir_id) {
|
||||
for export in exports.iter() {
|
||||
if let Def::Macro(def_id, ..) = export.def {
|
||||
if def_id.krate == LOCAL_CRATE || self.reexported_macros.contains(&def_id) {
|
||||
continue // These are `krate.exported_macros`, handled in `self.visit()`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue