Skip to content

Commit

Permalink
Rollup merge of #110632 - saethlin:panic-if-dep-graph-too-big, r=lcnr
Browse files Browse the repository at this point in the history
Panic instead of truncating if the incremental on-disk cache is too big

It seems _unlikely_ that anyone would hit this truncation, but if this `as` does actually truncate, that seems incredibly bad.
  • Loading branch information
Dylan-DPC committed Apr 21, 2023
2 parents f971264 + 010deb5 commit 1d1453a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_query_impl/src/on_disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl<'sess> rustc_middle::ty::OnDiskCache<'sess> for OnDiskCache<'sess> {
interpret_alloc_index.reserve(new_n - n);
for idx in n..new_n {
let id = encoder.interpret_allocs[idx];
let pos = encoder.position() as u32;
let pos: u32 = encoder.position().try_into().unwrap();
interpret_alloc_index.push(pos);
interpret::specialized_encode_alloc_id(&mut encoder, tcx, id);
}
Expand Down

0 comments on commit 1d1453a

Please sign in to comment.