Iterate DefId to encode expn_that_defined.
This commit is contained in:
parent
293e885daa
commit
7a5620c63a
@ -769,6 +769,7 @@ fn encode_def_ids(&mut self) {
|
||||
});
|
||||
record!(self.tables.span[def_id] <- tcx.def_span(def_id));
|
||||
record!(self.tables.attributes[def_id] <- tcx.get_attrs(def_id));
|
||||
record!(self.tables.expn_that_defined[def_id] <- self.tcx.expansion_that_defined(def_id));
|
||||
if should_encode_visibility(def_kind) {
|
||||
record!(self.tables.visibility[def_id] <- self.tcx.visibility(def_id));
|
||||
}
|
||||
@ -799,7 +800,6 @@ fn encode_enum_variant_info(&mut self, def: &ty::AdtDef, index: VariantIdx) {
|
||||
};
|
||||
|
||||
record!(self.tables.kind[def_id] <- EntryKind::Variant(self.lazy(data)));
|
||||
record!(self.tables.expn_that_defined[def_id] <- self.tcx.expansion_that_defined(def_id));
|
||||
record!(self.tables.children[def_id] <- variant.fields.iter().map(|f| {
|
||||
assert!(f.did.is_local());
|
||||
f.did.index
|
||||
@ -910,7 +910,6 @@ fn encode_field(
|
||||
debug!("EncodeContext::encode_field({:?})", def_id);
|
||||
|
||||
record!(self.tables.kind[def_id] <- EntryKind::Field);
|
||||
record!(self.tables.expn_that_defined[def_id] <- self.tcx.expansion_that_defined(def_id));
|
||||
self.encode_ident_span(def_id, field.ident);
|
||||
self.encode_stability(def_id);
|
||||
self.encode_deprecation(def_id);
|
||||
@ -933,7 +932,6 @@ fn encode_struct_ctor(&mut self, adt_def: &ty::AdtDef, def_id: DefId) {
|
||||
};
|
||||
|
||||
record!(self.tables.kind[def_id] <- EntryKind::Struct(self.lazy(data), adt_def.repr));
|
||||
record!(self.tables.expn_that_defined[def_id] <- self.tcx.expansion_that_defined(def_id));
|
||||
self.encode_stability(def_id);
|
||||
self.encode_deprecation(def_id);
|
||||
self.encode_item_type(def_id);
|
||||
@ -1380,7 +1378,6 @@ fn encode_info_for_item(&mut self, def_id: DefId, item: &'tcx hir::Item<'tcx>) {
|
||||
}
|
||||
};
|
||||
record!(self.tables.kind[def_id] <- entry_kind);
|
||||
record!(self.tables.expn_that_defined[def_id] <- self.tcx.expansion_that_defined(def_id));
|
||||
// FIXME(eddyb) there should be a nicer way to do this.
|
||||
match item.kind {
|
||||
hir::ItemKind::ForeignMod { items, .. } => record!(self.tables.children[def_id] <-
|
||||
|
Loading…
Reference in New Issue
Block a user