diff options
| author | Zachary S <zasample18+github@gmail.com> | 2024-11-13 16:24:37 -0600 |
|---|---|---|
| committer | Zachary S <zasample18+github@gmail.com> | 2024-12-07 17:36:40 -0600 |
| commit | 138327244fcc81ecd42a6dc1a7c80dc3f9d2703a (patch) | |
| tree | b449ecb77817fa56b8f3e1cbc71ad8b4f42c4a33 | |
| parent | 9c707a8b769523bb6768bf58e74fa2c39cc24844 (diff) | |
| download | rust-138327244fcc81ecd42a6dc1a7c80dc3f9d2703a.tar.gz rust-138327244fcc81ecd42a6dc1a7c80dc3f9d2703a.zip | |
Const-stabilize `str::is_char_boundary` and `str::split_at(_mut)(_checked)`.
| -rw-r--r-- | library/core/src/str/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 8a473b398bb..e17cdea8384 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -185,7 +185,7 @@ impl str { /// ``` #[must_use] #[stable(feature = "is_char_boundary", since = "1.9.0")] - #[rustc_const_unstable(feature = "const_is_char_boundary", issue = "131516")] + #[rustc_const_stable(feature = "const_is_char_boundary", since = "CURRENT_RUSTC_VERSION")] #[inline] pub const fn is_char_boundary(&self, index: usize) -> bool { // 0 is always ok. @@ -642,7 +642,7 @@ impl str { #[inline] #[must_use] #[stable(feature = "str_split_at", since = "1.4.0")] - #[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")] + #[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")] pub const fn split_at(&self, mid: usize) -> (&str, &str) { match self.split_at_checked(mid) { None => slice_error_fail(self, 0, mid), @@ -683,7 +683,7 @@ impl str { #[inline] #[must_use] #[stable(feature = "str_split_at", since = "1.4.0")] - #[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")] + #[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")] pub const fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) { // is_char_boundary checks that the index is in [0, .len()] if self.is_char_boundary(mid) { @@ -723,7 +723,7 @@ impl str { #[inline] #[must_use] #[stable(feature = "split_at_checked", since = "1.80.0")] - #[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")] + #[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")] pub const fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)> { // is_char_boundary checks that the index is in [0, .len()] if self.is_char_boundary(mid) { @@ -764,7 +764,7 @@ impl str { #[inline] #[must_use] #[stable(feature = "split_at_checked", since = "1.80.0")] - #[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")] + #[rustc_const_stable(feature = "const_str_split_at", since = "CURRENT_RUSTC_VERSION")] pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)> { // is_char_boundary checks that the index is in [0, .len()] if self.is_char_boundary(mid) { |
