diff options
Diffstat (limited to 'src/librustc_metadata/decoder.rs')
| -rw-r--r-- | src/librustc_metadata/decoder.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index d991fb0f67b..14984e8a6d7 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -298,9 +298,7 @@ impl<'a, 'tcx> SpecializedDecoder<interpret::AllocId> for DecodeContext<'a, 'tcx let allocation = self.tcx.unwrap().intern_const_alloc(allocation); interpret_interner().intern_at_reserved(alloc_id, allocation); - let num = usize::decode(self)?; - for _ in 0..num { - let glob = interpret::GlobalId::decode(self)?; + if let Some(glob) = Option::<DefId>::decode(self)? { interpret_interner().cache(glob, alloc_id); } |
