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:
commit
9a67b18888
@ -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
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user