Skip to content

Commit c504e89

Browse files
authored
Rollup merge of #80985 - ijackson:slice-strip-fix, r=jyn514
Fix stabilisation version of slice_strip See #77853 (review) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 parents ce3bc76 + b59fa3d commit c504e89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/slice/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ impl<T> [T] {
18771877
/// Some(b"llo".as_ref()));
18781878
/// ```
18791879
#[must_use = "returns the subslice without modifying the original"]
1880-
#[stable(feature = "slice_strip", since = "1.50.0")]
1880+
#[stable(feature = "slice_strip", since = "1.51.0")]
18811881
pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
18821882
where
18831883
T: PartialEq,
@@ -1911,7 +1911,7 @@ impl<T> [T] {
19111911
/// assert_eq!(v.strip_suffix(&[50, 30]), None);
19121912
/// ```
19131913
#[must_use = "returns the subslice without modifying the original"]
1914-
#[stable(feature = "slice_strip", since = "1.50.0")]
1914+
#[stable(feature = "slice_strip", since = "1.51.0")]
19151915
pub fn strip_suffix<P: SlicePattern<Item = T> + ?Sized>(&self, suffix: &P) -> Option<&[T]>
19161916
where
19171917
T: PartialEq,
@@ -3323,7 +3323,7 @@ pub trait SlicePattern {
33233323
fn as_slice(&self) -> &[Self::Item];
33243324
}
33253325

3326-
#[stable(feature = "slice_strip", since = "1.50.0")]
3326+
#[stable(feature = "slice_strip", since = "1.51.0")]
33273327
impl<T> SlicePattern for [T] {
33283328
type Item = T;
33293329

@@ -3333,7 +3333,7 @@ impl<T> SlicePattern for [T] {
33333333
}
33343334
}
33353335

3336-
#[stable(feature = "slice_strip", since = "1.50.0")]
3336+
#[stable(feature = "slice_strip", since = "1.51.0")]
33373337
impl<T, const N: usize> SlicePattern for [T; N] {
33383338
type Item = T;
33393339

0 commit comments

Comments
 (0)