We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c249a8 + 05154af commit 5c76e1aCopy full SHA for 5c76e1a
library/core/src/mem/mod.rs
@@ -960,7 +960,7 @@ pub fn drop<T>(_x: T) {}
960
///
961
/// This function is not magic; it is literally defined as
962
/// ```
963
-/// pub fn copy<T: Copy>(x: &T) -> T { *x }
+/// pub const fn copy<T: Copy>(x: &T) -> T { *x }
964
965
966
/// It is useful when you want to pass a function pointer to a combinator, rather than defining a new closure.
0 commit comments