Skip to content

Commit

Permalink
Rollup merge of rust-lang#46128 - Coding-Doctors:patch-1, r=dtolnay
Browse files Browse the repository at this point in the history
Fix doc tests for trim_right_matches

First pr, but isn't anything big so hopefully it should all be good.
  • Loading branch information
kennytm authored Nov 20, 2017
2 parents 2a2b2f4 + f69d4d4 commit 079a6e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/liballoc/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ impl str {
/// A more complex pattern, using a closure:
///
/// ```
/// assert_eq!("1fooX".trim_left_matches(|c| c == '1' || c == 'X'), "fooX");
/// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str
Expand Down

0 comments on commit 079a6e4

Please sign in to comment.