From b59fa3d6343d560d5b5bde65c76d8a4ea4c27949 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 13 Jan 2021 14:21:18 +0000 Subject: [PATCH] Fix stabilisation version of slice_strip See https://github.com/rust-lang/rust/pull/77853#pullrequestreview-564921079 Signed-off-by: Ian Jackson --- library/core/src/slice/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 081d80f4876..6de27140594 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -1877,7 +1877,7 @@ pub fn ends_with(&self, needle: &[T]) -> bool /// Some(b"llo".as_ref())); /// ``` #[must_use = "returns the subslice without modifying the original"] - #[stable(feature = "slice_strip", since = "1.50.0")] + #[stable(feature = "slice_strip", since = "1.51.0")] pub fn strip_prefix + ?Sized>(&self, prefix: &P) -> Option<&[T]> where T: PartialEq, @@ -1911,7 +1911,7 @@ pub fn strip_prefix + ?Sized>(&self, prefix: &P) -> Op /// assert_eq!(v.strip_suffix(&[50, 30]), None); /// ``` #[must_use = "returns the subslice without modifying the original"] - #[stable(feature = "slice_strip", since = "1.50.0")] + #[stable(feature = "slice_strip", since = "1.51.0")] pub fn strip_suffix + ?Sized>(&self, suffix: &P) -> Option<&[T]> where T: PartialEq, @@ -3323,7 +3323,7 @@ pub trait SlicePattern { fn as_slice(&self) -> &[Self::Item]; } -#[stable(feature = "slice_strip", since = "1.50.0")] +#[stable(feature = "slice_strip", since = "1.51.0")] impl SlicePattern for [T] { type Item = T; @@ -3333,7 +3333,7 @@ fn as_slice(&self) -> &[Self::Item] { } } -#[stable(feature = "slice_strip", since = "1.50.0")] +#[stable(feature = "slice_strip", since = "1.51.0")] impl SlicePattern for [T; N] { type Item = T;