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.
This commit is contained in:
Camille GILLOT 2021-10-02 22:55:04 +02:00
parent daf8903e8e
commit 4028b093e4

View File

@ -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