diff --git a/core/src/lib.rs b/core/src/lib.rs index 01cadd78cc09d..9edc1a8c1f588 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -152,7 +152,6 @@ #![feature(const_slice_from_ref)] #![feature(const_slice_split_at_mut)] #![feature(const_str_as_mut)] -#![feature(const_str_from_utf8_unchecked_mut)] #![feature(const_strict_overflow_ops)] #![feature(const_swap)] #![feature(const_try)] diff --git a/core/src/str/converts.rs b/core/src/str/converts.rs index d6459607221ae..e932b652e2dcc 100644 --- a/core/src/str/converts.rs +++ b/core/src/str/converts.rs @@ -195,7 +195,10 @@ pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str { #[inline] #[must_use] #[stable(feature = "str_mut_extras", since = "1.20.0")] -#[rustc_const_unstable(feature = "const_str_from_utf8_unchecked_mut", issue = "91005")] +#[rustc_const_stable( + feature = "const_str_from_utf8_unchecked_mut", + since = "CURRENT_RUSTC_VERSION" +)] #[rustc_diagnostic_item = "str_from_utf8_unchecked_mut"] pub const unsafe fn from_utf8_unchecked_mut(v: &mut [u8]) -> &mut str { // SAFETY: the caller must guarantee that the bytes `v`