properly track why we checked whether a pointer is in-bounds

also simplify the in-bounds checking in Miri's borrow trackers
This commit is contained in:
Ralf Jung
2023-08-01 17:03:19 +02:00
parent 7d5886504c
commit 8496292dda
44 changed files with 130 additions and 122 deletions

View File

@@ -224,8 +224,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
Len(place) => {
let src = self.eval_place(place)?;
let op = self.place_to_op(&src)?;
let len = op.len(self)?;
let len = src.len(self)?;
self.write_scalar(Scalar::from_target_usize(len, self), &dest)?;
}