Skip to content

Commit 78ad293

Browse files
library: Stabilize const_str_from_utf8_unchecked_mut
Const-stabilizes: - `str::from_utf8_unchecked_mut`
1 parent 7a5052a commit 78ad293

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
#![feature(const_slice_from_ref)]
153153
#![feature(const_slice_split_at_mut)]
154154
#![feature(const_str_as_mut)]
155-
#![feature(const_str_from_utf8_unchecked_mut)]
156155
#![feature(const_strict_overflow_ops)]
157156
#![feature(const_swap)]
158157
#![feature(const_try)]

core/src/str/converts.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {
195195
#[inline]
196196
#[must_use]
197197
#[stable(feature = "str_mut_extras", since = "1.20.0")]
198-
#[rustc_const_unstable(feature = "const_str_from_utf8_unchecked_mut", issue = "91005")]
198+
#[rustc_const_stable(
199+
feature = "const_str_from_utf8_unchecked_mut",
200+
since = "CURRENT_RUSTC_VERSION"
201+
)]
199202
#[rustc_diagnostic_item = "str_from_utf8_unchecked_mut"]
200203
pub const unsafe fn from_utf8_unchecked_mut(v: &mut [u8]) -> &mut str {
201204
// SAFETY: the caller must guarantee that the bytes `v`

0 commit comments

Comments
 (0)