Skip to content

Commit

Permalink
Do not ICE if some foreign expansions were not encoded.
Browse files Browse the repository at this point in the history
The metadata encoder does not necessarily encode all expansions, only
those which are referenced in other metadata fields.
  • Loading branch information
cjgillot committed Oct 6, 2021
1 parent daf8903 commit 4028b09
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_metadata/src/rmeta/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4028b09

Please sign in to comment.