Skip to content

Commit 010deb5

Browse files
committed
Panic instead of truncating if the dep graph is too big
1 parent 8bdcc62 commit 010deb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_query_impl/src/on_disk_cache.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl<'sess> rustc_middle::ty::OnDiskCache<'sess> for OnDiskCache<'sess> {
300300
interpret_alloc_index.reserve(new_n - n);
301301
for idx in n..new_n {
302302
let id = encoder.interpret_allocs[idx];
303-
let pos = encoder.position() as u32;
303+
let pos: u32 = encoder.position().try_into().unwrap();
304304
interpret_alloc_index.push(pos);
305305
interpret::specialized_encode_alloc_id(&mut encoder, tcx, id);
306306
}

0 commit comments

Comments
 (0)