]> git.lizzy.rs Git - rust.git/commitdiff
Removed aligned ZST requirement from docs of read_/write_unaligned.
authorkennytm <kennytm@gmail.com>
Fri, 28 Dec 2018 14:00:33 +0000 (22:00 +0800)
committerkennytm <kennytm@gmail.com>
Fri, 28 Dec 2018 14:00:33 +0000 (22:00 +0800)
This is just a copy-paste error.

src/libcore/ptr.rs

index b9420f32a949270783a3ef028880d22dc2287204..55a72d7a9a94daffebd36f40971ec297f210ec12 100644 (file)
@@ -591,7 +591,7 @@ pub unsafe fn read<T>(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 and properly aligned.
+/// Note that even if `T` has size `0`, the pointer must be non-NULL.
 ///
 /// [`Copy`]: ../marker/trait.Copy.html
 /// [`read`]: ./fn.read.html
@@ -759,7 +759,7 @@ pub unsafe fn write<T>(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 and properly aligned.
+/// Note that even if `T` has size `0`, the pointer must be non-NULL.
 ///
 /// [valid]: ../ptr/index.html#safety
 ///