diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs index 79ef81e81eb..84733f9af6d 100644 --- a/src/librustc/mir/interpret/allocation.rs +++ b/src/librustc/mir/interpret/allocation.rs @@ -228,7 +228,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation { // FIXME: Working around https://github.com/rust-lang/rust/issues/56209 where Extra: AllocationExtra { - self.get_bytes_internal(cx, ptr, size, true, CheckInAllocMsg::MemoryAccess) + self.get_bytes_internal(cx, ptr, size, true, CheckInAllocMsg::MemoryAccessTest) } /// It is the caller's responsibility to handle undefined and pointer bytes. @@ -243,7 +243,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation { // FIXME: Working around https://github.com/rust-lang/rust/issues/56209 where Extra: AllocationExtra { - self.get_bytes_internal(cx, ptr, size, false, CheckInAllocMsg::MemoryAccess) + self.get_bytes_internal(cx, ptr, size, false, CheckInAllocMsg::MemoryAccessTest) } /// Just calling this already marks everything as defined and removes relocations, @@ -258,7 +258,7 @@ impl<'tcx, Tag: Copy, Extra> Allocation { where Extra: AllocationExtra { assert_ne!(size.bytes(), 0, "0-sized accesses should never even get a `Pointer`"); - self.check_bounds(cx, ptr, size, CheckInAllocMsg::MemoryAccess)?; + self.check_bounds(cx, ptr, size, CheckInAllocMsg::MemoryAccessTest)?; self.mark_definedness(ptr, size, true)?; self.clear_relocations(cx, ptr, size)?; diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index 2fe6982fdf8..cf2d12b5935 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -461,9 +461,9 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for InterpError<'tcx, O> { use self::InterpError::*; match *self { PointerOutOfBounds { ptr, msg, allocation_size } => { - write!(f, "{} test failed: pointer must be in-bounds at offset {}, but is outside bounds of \ - allocation {} which has size {}", msg, - ptr.offset.bytes(), ptr.alloc_id, allocation_size.bytes()) + write!(f, "{} test failed: pointer must be in-bounds at offset {}, \ + but is outside bounds of allocation {} which has size {}", + msg, ptr.offset.bytes(), ptr.alloc_id, allocation_size.bytes()) }, ValidationFailure(ref err) => { write!(f, "type validation failed: {}", err)