This commit is contained in:
Ralf Jung 2023-09-30 23:32:13 +02:00
parent 45d5733ccb
commit 119113114c

View File

@ -506,8 +506,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
assert_eq!(index_len as u64, dest_len);
for i in 0..dest_len {
let src_index: u64 =
index[i as usize].unwrap_leaf().try_to_u32().unwrap().into();
let src_index: u64 = index[usize::try_from(i).unwrap()]
.unwrap_leaf()
.try_to_u32()
.unwrap()
.into();
let dest = this.project_index(&dest, i)?;
let val = if src_index < left_len {