summaryrefslogtreecommitdiff
path: root/compiler/rustc_query_impl
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-04-21 20:35:29 +0530
committerGitHub <noreply@github.com>2023-04-21 20:35:29 +0530
commit1d1453a2f643c2dce39daaac560e92dec599baf4 (patch)
tree4919d760d569f013cdcb6c597517c389a713b65a /compiler/rustc_query_impl
parentf971264fd7b40fe5a2326b317eaf86d849a5d54f (diff)
parent010deb5ba3158c60434535854632e5b190de6034 (diff)
downloadrust-1d1453a2f643c2dce39daaac560e92dec599baf4.tar.gz
Rollup merge of #110632 - saethlin:panic-if-dep-graph-too-big, r=lcnr
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.
Diffstat (limited to 'compiler/rustc_query_impl')
-rw-r--r--compiler/rustc_query_impl/src/on_disk_cache.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs
index 40869fdc467..c05323c2d6c 100644
--- a/compiler/rustc_query_impl/src/on_disk_cache.rs
+++ b/compiler/rustc_query_impl/src/on_disk_cache.rs
@@ -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);
}