diff options
| author | bors <bors@rust-lang.org> | 2020-05-29 00:42:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-29 00:42:59 +0000 |
| commit | 255c0338dc0b02f833fb1a816d76febd50c399c4 (patch) | |
| tree | de0df9b38d9052cbb8a7bd60c2a421dcd933e76c /src/libcore | |
| parent | 45127211566c53bac386b66909a830649182ab7a (diff) | |
| parent | 049b6dd4e1dfd3f3c42d45e44a6dc2f8ae1a7a14 (diff) | |
Auto merge of #72716 - Dylan-DPC:rollup-wdj97ab, r=Dylan-DPC
Rollup of 12 pull requests Successful merges: - #72239 (Implement PartialOrd and Ord for SocketAddr*) - #72466 (Stabilize str_strip feature) - #72605 (Add working example for E0617 explanation) - #72636 (Cleanup `Resolver::<clone|into>_outputs` methods) - #72645 (Add myself to .mailmap) - #72667 (expand unaligned_references test) - #72670 (Fix incorrect comment in generator test) - #72674 (Clippy should always build) - #72682 (Add test for #66930) - #72695 (update data layout for illumos x86) - #72697 (Remove rustc-ux-guidelines) - #72702 (rustc_lint: Remove `unused_crate_dependencies` from the `unused` group) Failed merges: r? @ghost
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/str/mod.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index c517286d498..b514e0f6d9c 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -4052,15 +4052,13 @@ impl str { /// # Examples /// /// ``` - /// #![feature(str_strip)] - /// /// assert_eq!("foo:bar".strip_prefix("foo:"), Some("bar")); /// assert_eq!("foo:bar".strip_prefix("bar"), None); /// assert_eq!("foofoo".strip_prefix("foo"), Some("foo")); /// ``` #[must_use = "this returns the remaining substring as a new slice, \ without modifying the original"] - #[unstable(feature = "str_strip", reason = "newly added", issue = "67302")] + #[stable(feature = "str_strip", since = "1.45.0")] pub fn strip_prefix<'a, P: Pattern<'a>>(&'a self, prefix: P) -> Option<&'a str> { prefix.strip_prefix_of(self) } @@ -4082,14 +4080,13 @@ impl str { /// # Examples /// /// ``` - /// #![feature(str_strip)] /// assert_eq!("bar:foo".strip_suffix(":foo"), Some("bar")); /// assert_eq!("bar:foo".strip_suffix("bar"), None); /// assert_eq!("foofoo".strip_suffix("foo"), Some("foo")); /// ``` #[must_use = "this returns the remaining substring as a new slice, \ without modifying the original"] - #[unstable(feature = "str_strip", reason = "newly added", issue = "67302")] + #[stable(feature = "str_strip", since = "1.45.0")] pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str> where P: Pattern<'a>, |
