]> git.lizzy.rs Git - rust.git/commitdiff
Improve miri's error reporting in check_in_alloc
authorLooMaclin <loo.maclin@protonmail.com>
Mon, 8 Apr 2019 21:01:08 +0000 (00:01 +0300)
committerLooMaclin <loo.maclin@protonmail.com>
Mon, 8 Apr 2019 21:01:08 +0000 (00:01 +0300)
src/librustc/mir/interpret/allocation.rs

index ca680187b37db13df69100474226cc379bb42cea..19f28b96c3a70d48fb87e27dffed374d264bd42b 100644 (file)
@@ -378,7 +378,8 @@ pub fn read_scalar<MemoryExtra>(
         where Extra: AllocationExtra<Tag, MemoryExtra>
     {
         // get_bytes_unchecked tests relocation edges
-        let bytes = self.get_bytes_with_undef_and_ptr(cx, ptr, size, CheckInAllocMsg::PointerArithmetic)?;
+        let bytes = self.get_bytes_with_undef_and_ptr(cx, ptr, size,
+                                                      CheckInAllocMsg::PointerArithmetic)?;
         // Undef check happens *after* we established that the alignment is correct.
         // We must not return Ok() for unaligned pointers!
         if self.check_defined(ptr, size).is_err() {