Iterate for super_predicates.

This commit is contained in:
Camille GILLOT 2021-02-06 10:36:23 +01:00
parent c74a3553ae
commit fcd6f20700
1 changed files with 3 additions and 11 deletions

View File

@ -947,6 +947,9 @@ impl EncodeContext<'a, 'tcx> {
record!(self.tables.inferred_outlives[def_id] <- inferred_outlives);
}
}
if let DefKind::Trait | DefKind::TraitAlias = def_kind {
record!(self.tables.super_predicates[def_id] <- self.tcx.super_predicates_of(def_id));
}
}
let inherent_impls = tcx.crate_inherent_impls(LOCAL_CRATE);
for (def_id, implementations) in inherent_impls.inherent_impls.iter() {
@ -1092,11 +1095,6 @@ impl EncodeContext<'a, 'tcx> {
}
}
fn encode_super_predicates(&mut self, def_id: DefId) {
debug!("EncodeContext::encode_super_predicates({:?})", def_id);
record!(self.tables.super_predicates[def_id] <- self.tcx.super_predicates_of(def_id));
}
fn encode_explicit_item_bounds(&mut self, def_id: DefId) {
debug!("EncodeContext::encode_explicit_item_bounds({:?})", def_id);
let bounds = self.tcx.explicit_item_bounds(def_id);
@ -1493,12 +1491,6 @@ impl EncodeContext<'a, 'tcx> {
record!(self.tables.impl_trait_ref[def_id] <- trait_ref);
}
}
match item.kind {
hir::ItemKind::Trait(..) | hir::ItemKind::TraitAlias(..) => {
self.encode_super_predicates(def_id);
}
_ => {}
}
}
/// Serialize the text of exported macros