From be226e49e47203602dbe176a0db2ddd188a9a489 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 12 Oct 2020 18:04:14 +0100 Subject: [PATCH 1/6] Stabilize split_inclusive Closes #72360. Signed-off-by: Ian Jackson --- library/alloc/tests/lib.rs | 1 - library/core/src/slice/iter.rs | 26 +++++++++++--------------- library/core/src/slice/mod.rs | 9 +++------ library/core/src/str/iter.rs | 12 ++++++------ library/core/src/str/mod.rs | 6 ++---- 5 files changed, 22 insertions(+), 32 deletions(-) diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index cd4174ed4007a..0b7eeab4e9679 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -14,7 +14,6 @@ #![feature(binary_heap_into_iter_sorted)] #![feature(binary_heap_drain_sorted)] #![feature(slice_ptr_get)] -#![feature(split_inclusive)] #![feature(binary_heap_retain)] #![feature(inplace_iteration)] #![feature(iter_map_while)] diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs index a367b4737dbac..53fdc7bc53be6 100644 --- a/library/core/src/slice/iter.rs +++ b/library/core/src/slice/iter.rs @@ -446,15 +446,13 @@ impl FusedIterator for Split<'_, T, P> where P: FnMut(&T) -> bool {} /// # Example /// /// ``` -/// #![feature(split_inclusive)] -/// /// let slice = [10, 40, 33, 20]; /// let mut iter = slice.split_inclusive(|num| num % 3 == 0); /// ``` /// /// [`split_inclusive`]: ../../std/primitive.slice.html#method.split_inclusive /// [slices]: ../../std/primitive.slice.html -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] pub struct SplitInclusive<'a, T: 'a, P> where P: FnMut(&T) -> bool, @@ -471,7 +469,7 @@ impl<'a, T: 'a, P: FnMut(&T) -> bool> SplitInclusive<'a, T, P> { } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl fmt::Debug for SplitInclusive<'_, T, P> where P: FnMut(&T) -> bool, @@ -485,7 +483,7 @@ where } // FIXME(#26925) Remove in favor of `#[derive(Clone)]` -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl Clone for SplitInclusive<'_, T, P> where P: Clone + FnMut(&T) -> bool, @@ -495,7 +493,7 @@ where } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, T, P> Iterator for SplitInclusive<'a, T, P> where P: FnMut(&T) -> bool, @@ -524,7 +522,7 @@ where } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, T, P> DoubleEndedIterator for SplitInclusive<'a, T, P> where P: FnMut(&T) -> bool, @@ -549,7 +547,7 @@ where } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl FusedIterator for SplitInclusive<'_, T, P> where P: FnMut(&T) -> bool {} /// An iterator over the mutable subslices of the vector which are separated @@ -689,15 +687,13 @@ impl FusedIterator for SplitMut<'_, T, P> where P: FnMut(&T) -> bool {} /// # Example /// /// ``` -/// #![feature(split_inclusive)] -/// /// let mut v = [10, 40, 30, 20, 60, 50]; /// let iter = v.split_inclusive_mut(|num| *num % 3 == 0); /// ``` /// /// [`split_inclusive_mut`]: ../../std/primitive.slice.html#method.split_inclusive_mut /// [slices]: ../../std/primitive.slice.html -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] pub struct SplitInclusiveMut<'a, T: 'a, P> where P: FnMut(&T) -> bool, @@ -714,7 +710,7 @@ impl<'a, T: 'a, P: FnMut(&T) -> bool> SplitInclusiveMut<'a, T, P> { } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl fmt::Debug for SplitInclusiveMut<'_, T, P> where P: FnMut(&T) -> bool, @@ -727,7 +723,7 @@ where } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, T, P> Iterator for SplitInclusiveMut<'a, T, P> where P: FnMut(&T) -> bool, @@ -767,7 +763,7 @@ where } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, T, P> DoubleEndedIterator for SplitInclusiveMut<'a, T, P> where P: FnMut(&T) -> bool, @@ -801,7 +797,7 @@ where } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl FusedIterator for SplitInclusiveMut<'_, T, P> where P: FnMut(&T) -> bool {} /// An iterator over subslices separated by elements that match a predicate diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 58bf74c8cf470..c19b323a422cf 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -60,7 +60,7 @@ pub use iter::ArrayWindows; #[unstable(feature = "slice_group_by", issue = "80552")] pub use iter::{GroupBy, GroupByMut}; -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] pub use iter::{SplitInclusive, SplitInclusiveMut}; #[stable(feature = "rust1", since = "1.0.0")] @@ -1549,7 +1549,6 @@ impl [T] { /// # Examples /// /// ``` - /// #![feature(split_inclusive)] /// let slice = [10, 40, 33, 20]; /// let mut iter = slice.split_inclusive(|num| num % 3 == 0); /// @@ -1563,7 +1562,6 @@ impl [T] { /// That slice will be the last item returned by the iterator. /// /// ``` - /// #![feature(split_inclusive)] /// let slice = [3, 10, 40, 33]; /// let mut iter = slice.split_inclusive(|num| num % 3 == 0); /// @@ -1571,7 +1569,7 @@ impl [T] { /// assert_eq!(iter.next().unwrap(), &[10, 40, 33]); /// assert!(iter.next().is_none()); /// ``` - #[unstable(feature = "split_inclusive", issue = "72360")] + #[stable(feature = "split_inclusive", since = "1.49.0")] #[inline] pub fn split_inclusive(&self, pred: F) -> SplitInclusive<'_, T, F> where @@ -1587,7 +1585,6 @@ impl [T] { /// # Examples /// /// ``` - /// #![feature(split_inclusive)] /// let mut v = [10, 40, 30, 20, 60, 50]; /// /// for group in v.split_inclusive_mut(|num| *num % 3 == 0) { @@ -1596,7 +1593,7 @@ impl [T] { /// } /// assert_eq!(v, [10, 40, 1, 20, 1, 1]); /// ``` - #[unstable(feature = "split_inclusive", issue = "72360")] + #[stable(feature = "split_inclusive", since = "1.49.0")] #[inline] pub fn split_inclusive_mut(&mut self, pred: F) -> SplitInclusiveMut<'_, T, F> where diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs index 28cd350019ebf..4fc28b1628351 100644 --- a/library/core/src/str/iter.rs +++ b/library/core/src/str/iter.rs @@ -1174,7 +1174,7 @@ pub struct SplitAsciiWhitespace<'a> { /// See its documentation for more. /// /// [`split_inclusive`]: str::split_inclusive -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] pub struct SplitInclusive<'a, P: Pattern<'a>>(pub(super) SplitInternal<'a, P>); #[stable(feature = "split_whitespace", since = "1.1.0")] @@ -1239,7 +1239,7 @@ impl<'a> DoubleEndedIterator for SplitAsciiWhitespace<'a> { #[stable(feature = "split_ascii_whitespace", since = "1.34.0")] impl FusedIterator for SplitAsciiWhitespace<'_> {} -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, P: Pattern<'a>> Iterator for SplitInclusive<'a, P> { type Item = &'a str; @@ -1249,7 +1249,7 @@ impl<'a, P: Pattern<'a>> Iterator for SplitInclusive<'a, P> { } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, P: Pattern<'a, Searcher: fmt::Debug>> fmt::Debug for SplitInclusive<'a, P> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("SplitInclusive").field("0", &self.0).finish() @@ -1257,14 +1257,14 @@ impl<'a, P: Pattern<'a, Searcher: fmt::Debug>> fmt::Debug for SplitInclusive<'a, } // FIXME(#26925) Remove in favor of `#[derive(Clone)]` -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, P: Pattern<'a, Searcher: Clone>> Clone for SplitInclusive<'a, P> { fn clone(&self) -> Self { SplitInclusive(self.0.clone()) } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, P: Pattern<'a, Searcher: ReverseSearcher<'a>>> DoubleEndedIterator for SplitInclusive<'a, P> { @@ -1274,7 +1274,7 @@ impl<'a, P: Pattern<'a, Searcher: ReverseSearcher<'a>>> DoubleEndedIterator } } -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] impl<'a, P: Pattern<'a>> FusedIterator for SplitInclusive<'a, P> {} impl<'a, P: Pattern<'a>> SplitInclusive<'a, P> { diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index ba495a1a9fbe4..e71d5889bd180 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -65,7 +65,7 @@ pub use iter::{EscapeDebug, EscapeDefault, EscapeUnicode}; #[stable(feature = "split_ascii_whitespace", since = "1.34.0")] pub use iter::SplitAsciiWhitespace; -#[unstable(feature = "split_inclusive", issue = "72360")] +#[stable(feature = "split_inclusive", since = "1.49.0")] use iter::SplitInclusive; #[unstable(feature = "str_internals", issue = "none")] @@ -1227,7 +1227,6 @@ impl str { /// # Examples /// /// ``` - /// #![feature(split_inclusive)] /// let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb." /// .split_inclusive('\n').collect(); /// assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb."]); @@ -1238,12 +1237,11 @@ impl str { /// That substring will be the last item returned by the iterator. /// /// ``` - /// #![feature(split_inclusive)] /// let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb.\n" /// .split_inclusive('\n').collect(); /// assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb.\n"]); /// ``` - #[unstable(feature = "split_inclusive", issue = "72360")] + #[stable(feature = "split_inclusive", since = "1.49.0")] #[inline] pub fn split_inclusive<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitInclusive<'a, P> { SplitInclusive(SplitInternal { From 2c1d6557c96fd65bd519fccdf3fe9c62ea17947b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 4 Jan 2021 16:29:12 +0000 Subject: [PATCH 2/6] Remove two obsolete uses of #![feature(split_inclusive)] Signed-off-by: Ian Jackson --- library/core/src/str/iter.rs | 1 - src/librustdoc/lib.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs index 4fc28b1628351..3a3d172937f47 100644 --- a/library/core/src/str/iter.rs +++ b/library/core/src/str/iter.rs @@ -1284,7 +1284,6 @@ impl<'a, P: Pattern<'a>> SplitInclusive<'a, P> { /// /// ``` /// #![feature(str_split_inclusive_as_str)] - /// #![feature(split_inclusive)] /// let mut split = "Mary had a little lamb".split_inclusive(' '); /// assert_eq!(split.as_str(), "Mary had a little lamb"); /// split.next(); diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 7ed64c5813fcd..fe883f9a17c46 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -15,7 +15,6 @@ #![feature(never_type)] #![feature(once_cell)] #![feature(type_ascription)] -#![feature(split_inclusive)] #![feature(str_split_once)] #![feature(iter_intersperse)] #![recursion_limit = "256"] From bd2c072b9b85847a7fe18e66398f2b607e2691a2 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 13 Jan 2021 13:48:36 +1000 Subject: [PATCH 3/6] bump split_inclusive stabilization to 1.51.0 --- library/core/src/slice/iter.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs index 53fdc7bc53be6..93358f58d2b77 100644 --- a/library/core/src/slice/iter.rs +++ b/library/core/src/slice/iter.rs @@ -452,7 +452,7 @@ impl FusedIterator for Split<'_, T, P> where P: FnMut(&T) -> bool {} /// /// [`split_inclusive`]: ../../std/primitive.slice.html#method.split_inclusive /// [slices]: ../../std/primitive.slice.html -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] pub struct SplitInclusive<'a, T: 'a, P> where P: FnMut(&T) -> bool, @@ -469,7 +469,7 @@ impl<'a, T: 'a, P: FnMut(&T) -> bool> SplitInclusive<'a, T, P> { } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl fmt::Debug for SplitInclusive<'_, T, P> where P: FnMut(&T) -> bool, @@ -483,7 +483,7 @@ where } // FIXME(#26925) Remove in favor of `#[derive(Clone)]` -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl Clone for SplitInclusive<'_, T, P> where P: Clone + FnMut(&T) -> bool, @@ -493,7 +493,7 @@ where } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, T, P> Iterator for SplitInclusive<'a, T, P> where P: FnMut(&T) -> bool, @@ -522,7 +522,7 @@ where } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, T, P> DoubleEndedIterator for SplitInclusive<'a, T, P> where P: FnMut(&T) -> bool, @@ -547,7 +547,7 @@ where } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl FusedIterator for SplitInclusive<'_, T, P> where P: FnMut(&T) -> bool {} /// An iterator over the mutable subslices of the vector which are separated @@ -693,7 +693,7 @@ impl FusedIterator for SplitMut<'_, T, P> where P: FnMut(&T) -> bool {} /// /// [`split_inclusive_mut`]: ../../std/primitive.slice.html#method.split_inclusive_mut /// [slices]: ../../std/primitive.slice.html -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] pub struct SplitInclusiveMut<'a, T: 'a, P> where P: FnMut(&T) -> bool, @@ -710,7 +710,7 @@ impl<'a, T: 'a, P: FnMut(&T) -> bool> SplitInclusiveMut<'a, T, P> { } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl fmt::Debug for SplitInclusiveMut<'_, T, P> where P: FnMut(&T) -> bool, @@ -723,7 +723,7 @@ where } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, T, P> Iterator for SplitInclusiveMut<'a, T, P> where P: FnMut(&T) -> bool, @@ -763,7 +763,7 @@ where } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, T, P> DoubleEndedIterator for SplitInclusiveMut<'a, T, P> where P: FnMut(&T) -> bool, @@ -797,7 +797,7 @@ where } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl FusedIterator for SplitInclusiveMut<'_, T, P> where P: FnMut(&T) -> bool {} /// An iterator over subslices separated by elements that match a predicate From 0620514094ec1d7b73c6f5ef86f92bc31a254ef2 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 13 Jan 2021 13:49:34 +1000 Subject: [PATCH 4/6] bump split_inclusive stabilization to 1.51.0 --- library/core/src/slice/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index c19b323a422cf..143542f4919b4 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -60,7 +60,7 @@ pub use iter::ArrayWindows; #[unstable(feature = "slice_group_by", issue = "80552")] pub use iter::{GroupBy, GroupByMut}; -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] pub use iter::{SplitInclusive, SplitInclusiveMut}; #[stable(feature = "rust1", since = "1.0.0")] @@ -1569,7 +1569,7 @@ impl [T] { /// assert_eq!(iter.next().unwrap(), &[10, 40, 33]); /// assert!(iter.next().is_none()); /// ``` - #[stable(feature = "split_inclusive", since = "1.49.0")] + #[stable(feature = "split_inclusive", since = "1.51.0")] #[inline] pub fn split_inclusive(&self, pred: F) -> SplitInclusive<'_, T, F> where @@ -1593,7 +1593,7 @@ impl [T] { /// } /// assert_eq!(v, [10, 40, 1, 20, 1, 1]); /// ``` - #[stable(feature = "split_inclusive", since = "1.49.0")] + #[stable(feature = "split_inclusive", since = "1.51.0")] #[inline] pub fn split_inclusive_mut(&mut self, pred: F) -> SplitInclusiveMut<'_, T, F> where From e4a2f333605983e917cd5f728542fc9982a6d5c3 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 13 Jan 2021 13:50:39 +1000 Subject: [PATCH 5/6] bump split_inclusive stabilization to 1.51.0 --- library/core/src/str/iter.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/core/src/str/iter.rs b/library/core/src/str/iter.rs index 3a3d172937f47..8b952eab2946d 100644 --- a/library/core/src/str/iter.rs +++ b/library/core/src/str/iter.rs @@ -1174,7 +1174,7 @@ pub struct SplitAsciiWhitespace<'a> { /// See its documentation for more. /// /// [`split_inclusive`]: str::split_inclusive -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] pub struct SplitInclusive<'a, P: Pattern<'a>>(pub(super) SplitInternal<'a, P>); #[stable(feature = "split_whitespace", since = "1.1.0")] @@ -1239,7 +1239,7 @@ impl<'a> DoubleEndedIterator for SplitAsciiWhitespace<'a> { #[stable(feature = "split_ascii_whitespace", since = "1.34.0")] impl FusedIterator for SplitAsciiWhitespace<'_> {} -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, P: Pattern<'a>> Iterator for SplitInclusive<'a, P> { type Item = &'a str; @@ -1249,7 +1249,7 @@ impl<'a, P: Pattern<'a>> Iterator for SplitInclusive<'a, P> { } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, P: Pattern<'a, Searcher: fmt::Debug>> fmt::Debug for SplitInclusive<'a, P> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("SplitInclusive").field("0", &self.0).finish() @@ -1257,14 +1257,14 @@ impl<'a, P: Pattern<'a, Searcher: fmt::Debug>> fmt::Debug for SplitInclusive<'a, } // FIXME(#26925) Remove in favor of `#[derive(Clone)]` -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, P: Pattern<'a, Searcher: Clone>> Clone for SplitInclusive<'a, P> { fn clone(&self) -> Self { SplitInclusive(self.0.clone()) } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, P: Pattern<'a, Searcher: ReverseSearcher<'a>>> DoubleEndedIterator for SplitInclusive<'a, P> { @@ -1274,7 +1274,7 @@ impl<'a, P: Pattern<'a, Searcher: ReverseSearcher<'a>>> DoubleEndedIterator } } -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] impl<'a, P: Pattern<'a>> FusedIterator for SplitInclusive<'a, P> {} impl<'a, P: Pattern<'a>> SplitInclusive<'a, P> { From 5584224fdacc0af6d72e023e247b1e3076fa44d8 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 13 Jan 2021 13:51:37 +1000 Subject: [PATCH 6/6] bump split_inclusive stabilization to 1.51.0 --- library/core/src/str/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index e71d5889bd180..3345654b923a8 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -65,7 +65,7 @@ pub use iter::{EscapeDebug, EscapeDefault, EscapeUnicode}; #[stable(feature = "split_ascii_whitespace", since = "1.34.0")] pub use iter::SplitAsciiWhitespace; -#[stable(feature = "split_inclusive", since = "1.49.0")] +#[stable(feature = "split_inclusive", since = "1.51.0")] use iter::SplitInclusive; #[unstable(feature = "str_internals", issue = "none")] @@ -1241,7 +1241,7 @@ impl str { /// .split_inclusive('\n').collect(); /// assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb.\n"]); /// ``` - #[stable(feature = "split_inclusive", since = "1.49.0")] + #[stable(feature = "split_inclusive", since = "1.51.0")] #[inline] pub fn split_inclusive<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitInclusive<'a, P> { SplitInclusive(SplitInternal {