Skip to content

Commit d1d0de9

Browse files
committed
disable debug assertion in ptr::write for now
1 parent bec5d37 commit d1d0de9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libcore/ptr/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,9 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
801801
#[inline]
802802
#[stable(feature = "rust1", since = "1.0.0")]
803803
pub unsafe fn write<T>(dst: *mut T, src: T) {
804-
debug_assert!(is_aligned_and_not_null(dst), "attempt to write to unaligned or null pointer");
804+
// FIXME: the debug assertion here causes codegen test failures on some architectures.
805+
// See <https://github.com/rust-lang/rust/pull/69208#issuecomment-591326757>.
806+
// debug_assert!(is_aligned_and_not_null(dst), "attempt to write to unaligned or null pointer");
805807
intrinsics::move_val_init(&mut *dst, src)
806808
}
807809

0 commit comments

Comments
 (0)