From d9ef419c90fff3797e8069979272c51c547119bb Mon Sep 17 00:00:00 2001 From: LemonJ <1632798336@qq.com> Date: Tue, 31 Dec 2024 10:59:13 +0800 Subject: [PATCH] fix doc for read write unaligned in zst operation --- library/core/src/ptr/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index ac074c097d94c..2f6d42d946ce6 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -1403,8 +1403,6 @@ pub const unsafe fn read(src: *const T) -> T { /// whether `T` is [`Copy`]. If `T` is not [`Copy`], using both the returned /// value and the value at `*src` can [violate memory safety][read-ownership]. /// -/// Note that even if `T` has size `0`, the pointer must be non-null. -/// /// [read-ownership]: read#ownership-of-the-returned-value /// [valid]: self#safety /// @@ -1611,8 +1609,6 @@ pub const unsafe fn write(dst: *mut T, src: T) { /// /// * `dst` must be [valid] for writes. /// -/// Note that even if `T` has size `0`, the pointer must be non-null. -/// /// [valid]: self#safety /// /// ## On `packed` structs