]> git.lizzy.rs Git - rust.git/commit
Auto merge of #77853 - ijackson:slice-strip-stab, r=Amanieu
authorbors <bors@rust-lang.org>
Thu, 7 Jan 2021 15:21:30 +0000 (15:21 +0000)
committerbors <bors@rust-lang.org>
Thu, 7 Jan 2021 15:21:30 +0000 (15:21 +0000)
commit8f0b945cfcc3d084583bc27a7ed23b27b1246751
tree8153c7ae5e6f3ea0a0a17e61dfbbe874d1bb2381
parentb5c496de374407c0937cf5257d89230b5358d053
parent8b2e79dbac324b703493113c9f823e63cf1df4e0
Auto merge of #77853 - ijackson:slice-strip-stab, r=Amanieu

Stabilize slice::strip_prefix and slice::strip_suffix

These two methods are useful.  The corresponding methods on `str` are already stable.

I believe that stablising these now would not get in the way of, in the future, extending these to take a richer pattern API a la `str`'s patterns.

Tracking PR: #73413.  I also have an outstanding PR to improve the docs for these two functions and the corresponding ones on `str`: #75078

I have tried to follow the [instructions in the dev guide](https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr).  The part to do with `compiler/rustc_feature` did not seem applicable.  I assume that's because these are just library features, so there is no corresponding machinery in rustc.
library/core/src/slice/mod.rs
library/std/src/lib.rs