From 05154af3e857f23b41072793e401a78a5aa952d9 Mon Sep 17 00:00:00 2001 From: SunkenPotato <3.14radius02@gmail.com> Date: Tue, 15 Jul 2025 16:26:24 +0200 Subject: [PATCH] docs: update documentation of core::mem::copy to include const on the fn signature --- library/core/src/mem/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 1bd12d818cfe6..164fcdad5c40f 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -960,7 +960,7 @@ pub fn drop(_x: T) {} /// /// This function is not magic; it is literally defined as /// ``` -/// pub fn copy(x: &T) -> T { *x } +/// pub const fn 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.