1
Fork 0

Impl EncodableWithShorthand for PredicateKind

This commit is contained in:
Jack Huey 2021-01-17 02:49:30 -05:00
parent f2ed9a3a8c
commit 674735b109
4 changed files with 43 additions and 1 deletions

View file

@ -46,6 +46,7 @@ pub(super) struct EncodeContext<'a, 'tcx> {
lazy_state: LazyState,
type_shorthands: FxHashMap<Ty<'tcx>, usize>,
predicate_shorthands: FxHashMap<ty::PredicateKind<'tcx>, usize>,
interpret_allocs: FxIndexSet<interpret::AllocId>,
@ -327,6 +328,10 @@ impl<'a, 'tcx> TyEncoder<'tcx> for EncodeContext<'a, 'tcx> {
&mut self.type_shorthands
}
fn predicate_shorthands(&mut self) -> &mut FxHashMap<ty::PredicateKind<'tcx>, usize> {
&mut self.predicate_shorthands
}
fn encode_alloc_id(
&mut self,
alloc_id: &rustc_middle::mir::interpret::AllocId,
@ -2146,6 +2151,7 @@ fn encode_metadata_impl(tcx: TyCtxt<'_>) -> EncodedMetadata {
tables: Default::default(),
lazy_state: LazyState::NoNode,
type_shorthands: Default::default(),
predicate_shorthands: Default::default(),
source_file_cache,
interpret_allocs: Default::default(),
required_source_files,