diff options
| author | LooMaclin <loo.maclin@protonmail.com> | 2019-04-09 00:01:08 +0300 |
|---|---|---|
| committer | LooMaclin <loo.maclin@protonmail.com> | 2019-04-09 00:01:08 +0300 |
| commit | 980db98b6440779ed714e454f544faf707b2ab9c (patch) | |
| tree | 7fcb88102c5c1235fc9e0864d88c3733ff410413 | |
| parent | 2a738bb8edc7c0ed77bb12657a55db666cffeda3 (diff) | |
| download | rust-980db98b6440779ed714e454f544faf707b2ab9c.tar.gz rust-980db98b6440779ed714e454f544faf707b2ab9c.zip | |
Improve miri's error reporting in check_in_alloc
| -rw-r--r-- | src/librustc/mir/interpret/allocation.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs index ca680187b37..19f28b96c3a 100644 --- a/src/librustc/mir/interpret/allocation.rs +++ b/src/librustc/mir/interpret/allocation.rs @@ -378,7 +378,8 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> { 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() { |
