Skip to content

Commit c77d0ee

Browse files
authored
Rollup merge of rust-lang#145756 - okaneco:stabilize_char_boundary, r=scottmcm
str: Stabilize `round_char_boundary` feature Closes rust-lang#93743 FCP completed rust-lang#93743 (comment)
2 parents 57a33fc + 391c9b6 commit c77d0ee

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

alloctests/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#![feature(inplace_iteration)]
2525
#![feature(iter_advance_by)]
2626
#![feature(iter_next_chunk)]
27-
#![feature(round_char_boundary)]
2827
#![feature(slice_partition_dedup)]
2928
#![feature(string_from_utf8_lossy_owned)]
3029
#![feature(string_remove_matches)]

core/src/str/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ impl str {
396396
/// # Examples
397397
///
398398
/// ```
399-
/// #![feature(round_char_boundary)]
400399
/// let s = "❤️🧡💛💚💙💜";
401400
/// assert_eq!(s.len(), 26);
402401
/// assert!(!s.is_char_boundary(13));
@@ -405,7 +404,8 @@ impl str {
405404
/// assert_eq!(closest, 10);
406405
/// assert_eq!(&s[..closest], "❤️🧡");
407406
/// ```
408-
#[unstable(feature = "round_char_boundary", issue = "93743")]
407+
#[stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")]
408+
#[rustc_const_stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")]
409409
#[inline]
410410
pub const fn floor_char_boundary(&self, index: usize) -> usize {
411411
if index >= self.len() {
@@ -439,7 +439,6 @@ impl str {
439439
/// # Examples
440440
///
441441
/// ```
442-
/// #![feature(round_char_boundary)]
443442
/// let s = "❤️🧡💛💚💙💜";
444443
/// assert_eq!(s.len(), 26);
445444
/// assert!(!s.is_char_boundary(13));
@@ -448,7 +447,8 @@ impl str {
448447
/// assert_eq!(closest, 14);
449448
/// assert_eq!(&s[..closest], "❤️🧡💛");
450449
/// ```
451-
#[unstable(feature = "round_char_boundary", issue = "93743")]
450+
#[stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")]
451+
#[rustc_const_stable(feature = "round_char_boundary", since = "CURRENT_RUSTC_VERSION")]
452452
#[inline]
453453
pub const fn ceil_char_boundary(&self, index: usize) -> usize {
454454
if index >= self.len() {

std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@
263263
all(target_vendor = "fortanix", target_env = "sgx"),
264264
feature(slice_index_methods, coerce_unsized, sgx_platform)
265265
)]
266-
#![cfg_attr(any(windows, target_os = "uefi"), feature(round_char_boundary))]
267266
#![cfg_attr(target_family = "wasm", feature(stdarch_wasm_atomic_wait))]
268267
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
269268
//

0 commit comments

Comments
 (0)