about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWaffle Lapkin <waffle.lapkin@gmail.com>2025-02-07 04:22:52 +0100
committerWaffle Lapkin <waffle.lapkin@gmail.com>2025-02-23 15:16:26 +0100
commitbf3ed81c206c7b4eb1b491e8c0d9545efa2e14a0 (patch)
tree2f7191b08805f815bf98467461704ccb7f7b89bd
parent1805b3348341e0918912ab61cb1dffad41648d23 (diff)
downloadrust-bf3ed81c206c7b4eb1b491e8c0d9545efa2e14a0.tar.gz
rust-bf3ed81c206c7b4eb1b491e8c0d9545efa2e14a0.zip
Stabilize `core::str::from_utf8_mut`
-rw-r--r--library/alloc/tests/lib.rs1
-rw-r--r--library/core/src/str/converts.rs2
-rw-r--r--library/core/src/str/mod.rs2
3 files changed, 2 insertions, 3 deletions
diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs
index f95be6a6df0..e003625f254 100644
--- a/library/alloc/tests/lib.rs
+++ b/library/alloc/tests/lib.rs
@@ -29,7 +29,6 @@
 #![feature(string_remove_matches)]
 #![feature(const_btree_len)]
 #![feature(const_trait_impl)]
-#![feature(const_str_from_utf8)]
 #![feature(panic_update_hook)]
 #![feature(pointer_is_aligned_to)]
 #![feature(test)]
diff --git a/library/core/src/str/converts.rs b/library/core/src/str/converts.rs
index de68f80aa0c..1276d9014f0 100644
--- a/library/core/src/str/converts.rs
+++ b/library/core/src/str/converts.rs
@@ -126,7 +126,7 @@ pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
 /// See the docs for [`Utf8Error`] for more details on the kinds of
 /// errors that can be returned.
 #[stable(feature = "str_mut_extras", since = "1.20.0")]
-#[rustc_const_unstable(feature = "const_str_from_utf8", issue = "91006")]
+#[rustc_const_stable(feature = "const_str_from_utf8", since = "CURRENT_RUSTC_VERSION")]
 #[rustc_diagnostic_item = "str_from_utf8_mut"]
 pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
     // FIXME(const-hack): This should use `?` again, once it's `const`
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs
index 4754d18b06e..7273af80726 100644
--- a/library/core/src/str/mod.rs
+++ b/library/core/src/str/mod.rs
@@ -265,7 +265,7 @@ impl str {
     /// See the docs for [`Utf8Error`] for more details on the kinds of
     /// errors that can be returned.
     #[stable(feature = "inherent_str_constructors", since = "CURRENT_RUSTC_VERSION")]
-    #[rustc_const_unstable(feature = "const_str_from_utf8", issue = "91006")]
+    #[rustc_const_stable(feature = "const_str_from_utf8", since = "CURRENT_RUSTC_VERSION")]
     #[rustc_diagnostic_item = "str_inherent_from_utf8_mut"]
     pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
         converts::from_utf8_mut(v)