From 0bb54814e1d076f397093917a48035fba96cfa1c Mon Sep 17 00:00:00 2001 From: Finomnis Date: Sun, 3 Sep 2023 23:20:31 +0200 Subject: [PATCH] Stabilize const_transmute_copy --- library/core/src/lib.rs | 1 - library/core/src/mem/mod.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index b97cb652076e4..e78a34cd41d15 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -156,7 +156,6 @@ #![feature(const_slice_split_at_mut)] #![feature(const_str_from_utf8_unchecked_mut)] #![feature(const_swap)] -#![feature(const_transmute_copy)] #![feature(const_try)] #![feature(const_type_id)] #![feature(const_type_name)] diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 732fcce0f2930..19b0c8669c805 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -1051,7 +1051,7 @@ pub const fn copy(x: &T) -> T { #[inline] #[must_use] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_unstable(feature = "const_transmute_copy", issue = "83165")] +#[rustc_const_stable(feature = "const_transmute_copy", since = "CURRENT_RUSTC_VERSION")] pub const unsafe fn transmute_copy(src: &Src) -> Dst { assert!( size_of::() >= size_of::(),