Skip to content

Commit e142019

Browse files
zachs18pull[bot]
authored andcommitted
Const-stabilize str::is_char_boundary and str::split_at(_mut)(_checked).
1 parent d8810e3 commit e142019

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/core/src/str/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ impl str {
361361
/// ```
362362
#[must_use]
363363
#[stable(feature = "is_char_boundary", since = "1.9.0")]
364-
#[rustc_const_unstable(feature = "const_is_char_boundary", issue = "131516")]
364+
#[rustc_const_stable(feature = "const_is_char_boundary", since = "CURRENT_RUSTC_VERSION")]
365365
#[inline]
366366
pub const fn is_char_boundary(&self, index: usize) -> bool {
367367
// 0 is always ok.
@@ -818,7 +818,7 @@ impl str {
818818
#[inline]
819819
#[must_use]
820820
#[stable(feature = "str_split_at", since = "1.4.0")]
821-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
821+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
822822
pub const fn split_at(&self, mid: usize) -> (&str, &str) {
823823
match self.split_at_checked(mid) {
824824
None => slice_error_fail(self, 0, mid),
@@ -859,7 +859,7 @@ impl str {
859859
#[inline]
860860
#[must_use]
861861
#[stable(feature = "str_split_at", since = "1.4.0")]
862-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
862+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
863863
pub const fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) {
864864
// is_char_boundary checks that the index is in [0, .len()]
865865
if self.is_char_boundary(mid) {
@@ -899,7 +899,7 @@ impl str {
899899
#[inline]
900900
#[must_use]
901901
#[stable(feature = "split_at_checked", since = "1.80.0")]
902-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
902+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
903903
pub const fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)> {
904904
// is_char_boundary checks that the index is in [0, .len()]
905905
if self.is_char_boundary(mid) {
@@ -940,7 +940,7 @@ impl str {
940940
#[inline]
941941
#[must_use]
942942
#[stable(feature = "split_at_checked", since = "1.80.0")]
943-
#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
943+
#[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")]
944944
pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)> {
945945
// is_char_boundary checks that the index is in [0, .len()]
946946
if self.is_char_boundary(mid) {

0 commit comments

Comments
 (0)