Skip to content

Commit ddd1986

Browse files
authored
Clean up on example doc fixes for ptr::copy
Follow up of #77385
1 parent f283d3f commit ddd1986

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/core/src/intrinsics.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1901,9 +1901,10 @@ pub unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
19011901
/// ```
19021902
/// use std::ptr;
19031903
///
1904-
/// /// # Safety:
1904+
/// /// # Safety
1905+
/// ///
19051906
/// /// * `ptr` must be correctly aligned for its type and non-zero.
1906-
/// /// * `ptr` must be valid for reads of `elts` contiguous objects of type `T`.
1907+
/// /// * `ptr` must be valid for reads of `elts` contiguous elements of type `T`.
19071908
/// /// * Those elements must not be used after calling this function unless `T: Copy`.
19081909
/// # #[allow(dead_code)]
19091910
/// unsafe fn from_buf_raw<T>(ptr: *const T, elts: usize) -> Vec<T> {

0 commit comments

Comments
 (0)