Skip to content

Commit 22e320b

Browse files
authored
Rollup merge of rust-lang#100006 - jyn514:update-copy, r=dtolnay
Make `core::mem::copy` const cc rust-lang#98262, rust-lang/libs-team#78
2 parents 5e97720 + b5d5682 commit 22e320b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/mem/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ pub fn drop<T>(_x: T) {}
10041004
/// ```
10051005
#[inline]
10061006
#[unstable(feature = "mem_copy_fn", issue = "98262")]
1007-
pub fn copy<T: Copy>(x: &T) -> T {
1007+
pub const fn copy<T: Copy>(x: &T) -> T {
10081008
*x
10091009
}
10101010

0 commit comments

Comments
 (0)