Skip to content

Commit 227cb73

Browse files
committed
Const-stabilize str::is_char_boundary and str::split_at(_mut)(_checked).
1 parent 5e9d429 commit 227cb73

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/str/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl str {
185185
/// ```
186186
#[must_use]
187187
#[stable(feature = "is_char_boundary", since = "1.9.0")]
188-
#[rustc_const_unstable(feature = "const_is_char_boundary", issue = "131516")]
188+
#[rustc_const_stable(feature = "const_is_char_boundary", since = "CURRENT_RUSTC_VERSION")]
189189
#[inline]
190190
pub const fn is_char_boundary(&self, index: usize) -> bool {
191191
// 0 is always ok.
@@ -642,7 +642,7 @@ impl str {
642642
#[inline]
643643
#[must_use]
644644
#[stable(feature = "str_split_at", since = "1.4.0")]
645-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
645+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
646646
pub const fn split_at(&self, mid: usize) -> (&str, &str) {
647647
match self.split_at_checked(mid) {
648648
None => slice_error_fail(self, 0, mid),
@@ -683,7 +683,7 @@ impl str {
683683
#[inline]
684684
#[must_use]
685685
#[stable(feature = "str_split_at", since = "1.4.0")]
686-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
686+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
687687
pub const fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) {
688688
// is_char_boundary checks that the index is in [0, .len()]
689689
if self.is_char_boundary(mid) {
@@ -723,7 +723,7 @@ impl str {
723723
#[inline]
724724
#[must_use]
725725
#[stable(feature = "split_at_checked", since = "1.80.0")]
726-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
726+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
727727
pub const fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)> {
728728
// is_char_boundary checks that the index is in [0, .len()]
729729
if self.is_char_boundary(mid) {
@@ -764,7 +764,7 @@ impl str {
764764
#[inline]
765765
#[must_use]
766766
#[stable(feature = "split_at_checked", since = "1.80.0")]
767-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
767+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
768768
pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)> {
769769
// is_char_boundary checks that the index is in [0, .len()]
770770
if self.is_char_boundary(mid) {

0 commit comments

Comments
 (0)