Skip to content

Commit e58f3d3

Browse files
authored
Things are only moved if non-copy
1 parent 20202da commit e58f3d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ pub unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
19041904
/// /// # Safety:
19051905
/// /// * `ptr` must be correctly aligned for its type and non-zero.
19061906
/// /// * `ptr` must be valid for reads of `elts` contiguous objects of type `T`.
1907-
/// /// * Those elements must not be used after calling this function.
1907+
/// /// * Those elements must not be used after calling this function unless `T: Copy`.
19081908
/// # #[allow(dead_code)]
19091909
/// unsafe fn from_buf_raw<T>(ptr: *const T, elts: usize) -> Vec<T> {
19101910
/// let mut dst = Vec::with_capacity(elts);

0 commit comments

Comments
 (0)