Skip to content

Commit

Permalink
disable debug assertion in ptr::write for now
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Feb 27, 2020
1 parent bec5d37 commit d1d0de9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libcore/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit d1d0de9

Please sign in to comment.