about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-07-24 20:47:24 +0200
committerRalf Jung <post@ralfj.de>2019-07-24 20:47:24 +0200
commitf2900b0b411f655dba96d278cf21d2face3811f6 (patch)
treec5c41f49bc76f68ac41d7dc8d478f0c9c3a7c08c
parent01512616d15b779de4a63f41351ade91dee88ac1 (diff)
downloadrust-f2900b0b411f655dba96d278cf21d2face3811f6.tar.gz
rust-f2900b0b411f655dba96d278cf21d2face3811f6.zip
re-enable debug checks in Miri
-rw-r--r--src/libcore/intrinsics.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index aff36aba01f..56e45c3695f 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1333,7 +1333,6 @@ 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;
@@ -1438,7 +1437,6 @@ 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)
 }