Skip to content

Commit 8091a56

Browse files
authored
Unrolled build for #143970
Rollup merge of #143970 - SunkenPotato:update_mem_copy_docs, r=scottmcm Update core::mem::copy documentation Update the documentation of `core::mem::copy` to include a `const` on the definition of the function.
2 parents b56aaec + 05154af commit 8091a56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/mem/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ pub fn drop<T>(_x: T) {}
960960
///
961961
/// This function is not magic; it is literally defined as
962962
/// ```
963-
/// pub fn copy<T: Copy>(x: &T) -> T { *x }
963+
/// pub const fn copy<T: Copy>(x: &T) -> T { *x }
964964
/// ```
965965
///
966966
/// It is useful when you want to pass a function pointer to a combinator, rather than defining a new closure.

0 commit comments

Comments
 (0)