Commit 8f0b945
committed
Auto merge of rust-lang#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: rust-lang#73413. I also have an outstanding PR to improve the docs for these two functions and the corresponding ones on `str`: rust-lang#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.2 files changed
+44
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1872 | 1872 | | |
1873 | 1873 | | |
1874 | 1874 | | |
1875 | | - | |
1876 | 1875 | | |
1877 | 1876 | | |
1878 | 1877 | | |
1879 | 1878 | | |
1880 | 1879 | | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1881 | 1884 | | |
1882 | 1885 | | |
1883 | | - | |
1884 | | - | |
| 1886 | + | |
| 1887 | + | |
1885 | 1888 | | |
1886 | 1889 | | |
1887 | 1890 | | |
| 1891 | + | |
| 1892 | + | |
1888 | 1893 | | |
1889 | 1894 | | |
1890 | 1895 | | |
| |||
1905 | 1910 | | |
1906 | 1911 | | |
1907 | 1912 | | |
1908 | | - | |
1909 | 1913 | | |
1910 | 1914 | | |
1911 | 1915 | | |
1912 | 1916 | | |
1913 | 1917 | | |
1914 | 1918 | | |
1915 | 1919 | | |
1916 | | - | |
1917 | | - | |
| 1920 | + | |
| 1921 | + | |
1918 | 1922 | | |
1919 | 1923 | | |
1920 | 1924 | | |
| 1925 | + | |
| 1926 | + | |
1921 | 1927 | | |
1922 | 1928 | | |
1923 | 1929 | | |
| |||
3310 | 3316 | | |
3311 | 3317 | | |
3312 | 3318 | | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | 310 | | |
312 | 311 | | |
313 | 312 | | |
| |||
0 commit comments