diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2025-08-29 19:33:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-29 19:33:03 -0500 |
| commit | 751a9ad2e2470cb877307d9fa5c6e43bbc428cf5 (patch) | |
| tree | 58feed63b2d9ca470079d3257689535555b45677 /library/core/src | |
| parent | ed9e767c01ad257e4e86e40415aacf4019b64f7d (diff) | |
| parent | e42c1b12961385d6a5e9e442344fcaef8678ab58 (diff) | |
Rollup merge of #145756 - okaneco:stabilize_char_boundary, r=scottmcm
str: Stabilize `round_char_boundary` feature Closes https://github.com/rust-lang/rust/issues/93743 FCP completed https://github.com/rust-lang/rust/issues/93743#issuecomment-3168382171
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/str/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 1a055a0a5ad..f1db385e212 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -396,7 +396,6 @@ impl str { /// # Examples /// /// ``` - /// #![feature(round_char_boundary)] /// let s = "โค๏ธ๐งก๐๐๐๐"; /// assert_eq!(s.len(), 26); /// assert!(!s.is_char_boundary(13)); @@ -405,7 +404,8 @@ impl str { /// assert_eq!(closest, 10); /// assert_eq!(&s[..closest], "โค๏ธ๐งก"); /// ``` - #[unstable(feature = "round_char_boundary", issue = "93743")] + #[stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")] #[inline] pub const fn floor_char_boundary(&self, index: usize) -> usize { if index >= self.len() { @@ -439,7 +439,6 @@ impl str { /// # Examples /// /// ``` - /// #![feature(round_char_boundary)] /// let s = "โค๏ธ๐งก๐๐๐๐"; /// assert_eq!(s.len(), 26); /// assert!(!s.is_char_boundary(13)); @@ -448,7 +447,8 @@ impl str { /// assert_eq!(closest, 14); /// assert_eq!(&s[..closest], "โค๏ธ๐งก๐"); /// ``` - #[unstable(feature = "round_char_boundary", issue = "93743")] + #[stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")] #[inline] pub const fn ceil_char_boundary(&self, index: usize) -> usize { if index >= self.len() { |
