disable debug assertion in ptr::write for now
This commit is contained in:
parent
bec5d37ee1
commit
d1d0de94db
@ -801,7 +801,9 @@ pub unsafe fn read_unaligned<T>(src: *const T) -> T {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub unsafe fn write<T>(dst: *mut T, src: T) {
|
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)
|
intrinsics::move_val_init(&mut *dst, src)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user