From 4028b093e468afad4896a1658924e3e3f3b8f57c Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 2 Oct 2021 22:55:04 +0200 Subject: [PATCH] Do not ICE if some foreign expansions were not encoded. The metadata encoder does not necessarily encode all expansions, only those which are referenced in other metadata fields. --- compiler/rustc_metadata/src/rmeta/decoder.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index ffb7fdacd22..9b97d1a4762 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -1646,8 +1646,6 @@ impl<'a, 'tcx> CrateMetadataRef<'a> { let i = ExpnIndex::from_u32(i); if let Some(hash) = self.root.expn_hashes.get(self, i) { map.insert(hash.decode(self), i); - } else { - panic!("Missing expn_hash entry for {:?}", i); } } map