Skip to content

Commit 11464e7

Browse files
committed
Improve miri's error reporting in check_in_alloc
1 parent e5b6fab commit 11464e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/interpret/memory.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
252252
Scalar::Ptr(ptr) => {
253253
// check this is not NULL -- which we can ensure only if this is in-bounds
254254
// of some (potentially dead) allocation.
255-
let align = self.check_bounds_ptr(ptr, InboundsCheck::MaybeDead, CheckInAllocMsg::NullPointer)?;
255+
let align = self.check_bounds_ptr(ptr, InboundsCheck::MaybeDead,
256+
CheckInAllocMsg::NullPointer)?;
256257
(ptr.offset.bytes(), align)
257258
}
258259
Scalar::Bits { bits, size } => {

0 commit comments

Comments
 (0)