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 2, 2021
1 parent d1def47 commit f3e6d03
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 @@ -1645,8 +1645,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 f3e6d03

Please sign in to comment.