about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-23 15:55:26 +0000
committerbors <bors@rust-lang.org>2019-07-23 15:55:26 +0000
commit299ef86e1f8b3e53154f834115752c719b611fa1 (patch)
tree34d240b8b260c717bc9dd8bda7d7a3bf82de4400 /src/libcore
parent3ebca72a11869f946b31f900faffb75c2bb2473a (diff)
parent10f877b5ea4ddbdfb2364a1ff82ad4fa37b76ae7 (diff)
downloadrust-299ef86e1f8b3e53154f834115752c719b611fa1.tar.gz
rust-299ef86e1f8b3e53154f834115752c719b611fa1.zip
Auto merge of #62823 - RalfJung:miri, r=oli-obk
update Miri

Fixes https://github.com/rust-lang/rust/issues/62802

r? @oli-obk @eddyb
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 56e45c3695f..aff36aba01f 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1333,6 +1333,7 @@ pub(crate) fn is_aligned_and_not_null<T>(ptr: *const T) -> bool {
 
 /// Checks whether the regions of memory starting at `src` and `dst` of size
 /// `count * size_of::<T>()` overlap.
+#[cfg(not(miri))] // Cannot compare with `>` across allocations in Miri
 fn overlaps<T>(src: *const T, dst: *const T, count: usize) -> bool {
     let src_usize = src as usize;
     let dst_usize = dst as usize;
@@ -1437,6 +1438,7 @@ pub unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
 
     debug_assert!(is_aligned_and_not_null(src), "attempt to copy from unaligned or null pointer");
     debug_assert!(is_aligned_and_not_null(dst), "attempt to copy to unaligned or null pointer");
+    #[cfg(not(miri))]
     debug_assert!(!overlaps(src, dst, count), "attempt to copy to overlapping memory");
     copy_nonoverlapping(src, dst, count)
 }