diff options
| author | scottmcm <scottmcm@users.noreply.github.com> | 2020-10-01 07:04:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-01 07:04:20 +0000 |
| commit | e58f3d352d1c6f0ccc0b089754939bbcb7a2c294 (patch) | |
| tree | ab80d369d562c37f206dd1fce10b641b7b14cbb9 | |
| parent | 20202da09e86bd15ffcd0ce22b5ebe8a27ef17a0 (diff) | |
| download | rust-e58f3d352d1c6f0ccc0b089754939bbcb7a2c294.tar.gz rust-e58f3d352d1c6f0ccc0b089754939bbcb7a2c294.zip | |
Things are only moved if non-copy
| -rw-r--r-- | library/core/src/intrinsics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<T>(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<T>(ptr: *const T, elts: usize) -> Vec<T> { /// let mut dst = Vec::with_capacity(elts); |
