diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-25 11:16:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-25 11:16:34 +0200 |
| commit | e3b07352a61f23b5288a60649d5ac4d0a29c1246 (patch) | |
| tree | bc37ac4b48ab194d752de7e3b9ce5ef3b0631285 /library/core | |
| parent | dd159ee24e06badc4289bb510f75949908d1a422 (diff) | |
| parent | 05154af3e857f23b41072793e401a78a5aa952d9 (diff) | |
| download | rust-e3b07352a61f23b5288a60649d5ac4d0a29c1246.tar.gz rust-e3b07352a61f23b5288a60649d5ac4d0a29c1246.zip | |
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.
Diffstat (limited to 'library/core')
| -rw-r--r-- | library/core/src/mem/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 2198d098c4b..33407637ab3 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -960,7 +960,7 @@ pub fn drop<T>(_x: T) {} /// /// This function is not magic; it is literally defined as /// ``` -/// pub fn copy<T: Copy>(x: &T) -> T { *x } +/// pub const fn copy<T: Copy>(x: &T) -> T { *x } /// ``` /// /// It is useful when you want to pass a function pointer to a combinator, rather than defining a new closure. |
