Skip to content

Commit fcd6f20

Browse files
committed
Iterate for super_predicates.
1 parent c74a355 commit fcd6f20

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,9 @@ impl EncodeContext<'a, 'tcx> {
947947
record!(self.tables.inferred_outlives[def_id] <- inferred_outlives);
948948
}
949949
}
950+
if let DefKind::Trait | DefKind::TraitAlias = def_kind {
951+
record!(self.tables.super_predicates[def_id] <- self.tcx.super_predicates_of(def_id));
952+
}
950953
}
951954
let inherent_impls = tcx.crate_inherent_impls(LOCAL_CRATE);
952955
for (def_id, implementations) in inherent_impls.inherent_impls.iter() {
@@ -1092,11 +1095,6 @@ impl EncodeContext<'a, 'tcx> {
10921095
}
10931096
}
10941097

1095-
fn encode_super_predicates(&mut self, def_id: DefId) {
1096-
debug!("EncodeContext::encode_super_predicates({:?})", def_id);
1097-
record!(self.tables.super_predicates[def_id] <- self.tcx.super_predicates_of(def_id));
1098-
}
1099-
11001098
fn encode_explicit_item_bounds(&mut self, def_id: DefId) {
11011099
debug!("EncodeContext::encode_explicit_item_bounds({:?})", def_id);
11021100
let bounds = self.tcx.explicit_item_bounds(def_id);
@@ -1493,12 +1491,6 @@ impl EncodeContext<'a, 'tcx> {
14931491
record!(self.tables.impl_trait_ref[def_id] <- trait_ref);
14941492
}
14951493
}
1496-
match item.kind {
1497-
hir::ItemKind::Trait(..) | hir::ItemKind::TraitAlias(..) => {
1498-
self.encode_super_predicates(def_id);
1499-
}
1500-
_ => {}
1501-
}
15021494
}
15031495

15041496
/// Serialize the text of exported macros

0 commit comments

Comments
 (0)