From: Camille GILLOT Date: Sat, 2 Oct 2021 20:55:04 +0000 (+0200) Subject: Do not ICE if some foreign expansions were not encoded. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;ds=sidebyside;h=4028b093e468afad4896a1658924e3e3f3b8f57c;p=rust.git 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. --- 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 @@ fn expn_hash_to_expn_id(&self, sess: &Session, index_guess: u32, hash: ExpnHash) 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