Skip to content

Commit e767db1

Browse files
Rollup merge of rust-lang#81940 - jhpratt:stabilize-str_split_once, r=m-ou-se
Stabilize str_split_once Closes rust-lang#74773
2 parents 56e18ca + 4d8f016 commit e767db1

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

alloc/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#![feature(exact_size_is_empty)]
77
#![feature(new_uninit)]
88
#![feature(pattern)]
9-
#![feature(str_split_once)]
109
#![feature(trusted_len)]
1110
#![feature(try_reserve)]
1211
#![feature(unboxed_closures)]

core/src/str/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,13 +1506,11 @@ impl str {
15061506
/// # Examples
15071507
///
15081508
/// ```
1509-
/// #![feature(str_split_once)]
1510-
///
15111509
/// assert_eq!("cfg".split_once('='), None);
15121510
/// assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
15131511
/// assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
15141512
/// ```
1515-
#[unstable(feature = "str_split_once", reason = "newly added", issue = "74773")]
1513+
#[stable(feature = "str_split_once", since = "1.52.0")]
15161514
#[inline]
15171515
pub fn split_once<'a, P: Pattern<'a>>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)> {
15181516
let (start, end) = delimiter.into_searcher(self).next_match()?;
@@ -1525,13 +1523,11 @@ impl str {
15251523
/// # Examples
15261524
///
15271525
/// ```
1528-
/// #![feature(str_split_once)]
1529-
///
15301526
/// assert_eq!("cfg".rsplit_once('='), None);
15311527
/// assert_eq!("cfg=foo".rsplit_once('='), Some(("cfg", "foo")));
15321528
/// assert_eq!("cfg=foo=bar".rsplit_once('='), Some(("cfg=foo", "bar")));
15331529
/// ```
1534-
#[unstable(feature = "str_split_once", reason = "newly added", issue = "74773")]
1530+
#[stable(feature = "str_split_once", since = "1.52.0")]
15351531
#[inline]
15361532
pub fn rsplit_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>
15371533
where

std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@
314314
#![feature(stdsimd)]
315315
#![feature(stmt_expr_attributes)]
316316
#![feature(str_internals)]
317-
#![feature(str_split_once)]
318317
#![feature(test)]
319318
#![feature(thread_local)]
320319
#![feature(thread_local_internals)]

test/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#![feature(termination_trait_lib)]
3232
#![feature(test)]
3333
#![feature(total_cmp)]
34-
#![feature(str_split_once)]
3534

3635
// Public reexports
3736
pub use self::bench::{black_box, Bencher};

0 commit comments

Comments
 (0)