]> git.proxmox.com Git - rustc.git/blobdiff - src/libcore/ptr/mod.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / libcore / ptr / mod.rs
index 72c46f58fcc7b02560ff8e1702cdfbd15657425e..4913cd73a2a9a373edb03badb983f8e640cb11b8 100644 (file)
@@ -810,9 +810,7 @@ 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) {
-    // 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");
+    debug_assert!(is_aligned_and_not_null(dst), "attempt to write to unaligned or null pointer");
     intrinsics::move_val_init(&mut *dst, src)
 }