diff options
| author | Ralf Jung <post@ralfj.de> | 2020-02-27 10:00:40 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-03-14 14:05:26 +0100 |
| commit | 058ff728dc2a16b44c8abad2581287743c828270 (patch) | |
| tree | 5bc0a2d69dc9a1bb49413802806365a321d9fa0b /src | |
| parent | 1572c433eed495d0ade41511ae106b180e02851d (diff) | |
| download | rust-058ff728dc2a16b44c8abad2581287743c828270.tar.gz rust-058ff728dc2a16b44c8abad2581287743c828270.zip | |
debug-assert ptr sanity in ptr::write
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/ptr/mod.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs index 72c46f58fcc..4913cd73a2a 100644 --- a/src/libcore/ptr/mod.rs +++ b/src/libcore/ptr/mod.rs @@ -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) } |
