Skip to content

Commit

Permalink
Iterate for super_predicates.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Mar 17, 2021
1 parent c74a355 commit fcd6f20
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions compiler/rustc_metadata/src/rmeta/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fcd6f20

Please sign in to comment.