Panic instead of truncating if the dep graph is too big

This commit is contained in:
Ben Kimock 2023-04-20 21:12:39 -04:00
parent 8bdcc62cb0
commit 010deb5ba3

View File

@ -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);
}