]> git.lizzy.rs Git - rust.git/commitdiff
disable debug assertion in ptr::write for now
authorRalf Jung <post@ralfj.de>
Thu, 27 Feb 2020 08:43:20 +0000 (09:43 +0100)
committerRalf Jung <post@ralfj.de>
Thu, 27 Feb 2020 08:43:33 +0000 (09:43 +0100)
src/libcore/ptr/mod.rs

index ce21773165a6a58ffd2bdfbf6b25c46eb909da6a..52af439d853d54ecfe7f3c81e6fc38dec2eb4f90 100644 (file)
@@ -801,7 +801,9 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
 #[inline]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub unsafe fn write<T>(dst: *mut T, src: T) {
-    debug_assert!(is_aligned_and_not_null(dst), "attempt to write to unaligned or null pointer");
+    // FIXME: the debug assertion here causes codegen test failures on some architectures.
+    // See <https://github.com/rust-lang/rust/pull/69208#issuecomment-591326757>.
+    // debug_assert!(is_aligned_and_not_null(dst), "attempt to write to unaligned or null pointer");
     intrinsics::move_val_init(&mut *dst, src)
 }