From e58f3d352d1c6f0ccc0b089754939bbcb7a2c294 Mon Sep 17 00:00:00 2001 From: scottmcm Date: Thu, 1 Oct 2020 07:04:20 +0000 Subject: [PATCH] Things are only moved if non-copy --- library/core/src/intrinsics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 18b54c8ea3e..4e4b31c0cb4 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -1904,7 +1904,7 @@ pub unsafe fn copy_nonoverlapping(src: *const T, dst: *mut T, count: usize) { /// /// # 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`. -/// /// * Those elements must not be used after calling this function. +/// /// * Those elements must not be used after calling this function unless `T: Copy`. /// # #[allow(dead_code)] /// unsafe fn from_buf_raw(ptr: *const T, elts: usize) -> Vec { /// let mut dst = Vec::with_capacity(elts);