adjust constValue::Slice to work for arbitrary slice types

This commit is contained in:
Ralf Jung 2023-09-15 15:59:47 +02:00
parent 0692db1a90
commit ea22adbabd
12 changed files with 75 additions and 63 deletions

View file

@ -89,7 +89,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
}
this.write_immediate(
Immediate::new_slice(Scalar::from_maybe_pointer(alloc.ptr(), this), len, this),
Immediate::new_slice(alloc.ptr(), len, this),
dest,
)?;
}