library: Stabilize const_str_from_utf8_unchecked_mut
Const-stabilizes: - `str::from_utf8_unchecked_mut`
This commit is contained in:
parent
e6eb45143c
commit
a0228686d1
2 changed files with 4 additions and 2 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue