]> git.lizzy.rs Git - rust.git/commitdiff
Do not ICE if some foreign expansions were not encoded.
authorCamille GILLOT <gillot.camille@gmail.com>
Sat, 2 Oct 2021 20:55:04 +0000 (22:55 +0200)
committerCamille GILLOT <gillot.camille@gmail.com>
Wed, 6 Oct 2021 17:10:08 +0000 (19:10 +0200)
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

index ffb7fdacd2275ce6ce204e0f235ccf28de1b9656..9b97d1a4762105efdea01851382e6f5793e1da44 100644 (file)
@@ -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