diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-10-02 20:27:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-02 20:27:14 +0200 |
| commit | 14d8ee34655aaa1cb919b9d7e0805737b53c421f (patch) | |
| tree | 3b5c0e4acd924ffb537a43a52e8eb316daafad79 | |
| parent | edae965048412b4affabc266341e2d14200b8164 (diff) | |
| parent | ddd19866a739deb7cf798218d3b5b52a77b04a7a (diff) | |
| download | rust-14d8ee34655aaa1cb919b9d7e0805737b53c421f.tar.gz rust-14d8ee34655aaa1cb919b9d7e0805737b53c421f.zip | |
Rollup merge of #77442 - pickfire:patch-7, r=scottmcm
Clean up on example doc fixes for ptr::copy Follow up of #77385 r? @scottmcm
| -rw-r--r-- | library/core/src/intrinsics.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 4e4b31c0cb4..426cdb12ec4 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -1901,9 +1901,10 @@ pub unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) { /// ``` /// use std::ptr; /// -/// /// # Safety: +/// /// # Safety +/// /// /// /// * `ptr` must be correctly aligned for its type and non-zero. -/// /// * `ptr` must be valid for reads of `elts` contiguous objects of type `T`. +/// /// * `ptr` must be valid for reads of `elts` contiguous elements of type `T`. /// /// * Those elements must not be used after calling this function unless `T: Copy`. /// # #[allow(dead_code)] /// unsafe fn from_buf_raw<T>(ptr: *const T, elts: usize) -> Vec<T> { |
