Rollup merge of #57168 - kennytm:fix-unaligned-docs, r=rkruppe

Removed aligned ZST requirement from docs of read_/write_unaligned.

This is just a copy-paste error.
This commit is contained in:
kennytm 2018-12-29 18:50:29 +08:00 committed by GitHub
commit 9a67b18888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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 /// 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]. /// 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 /// [`Copy`]: ../marker/trait.Copy.html
/// [`read`]: ./fn.read.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. /// * `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 /// [valid]: ../ptr/index.html#safety
/// ///