Skip to content

Commit 079a6e4

Browse files
authored
Rollup merge of rust-lang#46128 - Coding-Doctors:patch-1, r=dtolnay
Fix doc tests for trim_right_matches First pr, but isn't anything big so hopefully it should all be good.
2 parents 2a2b2f4 + f69d4d4 commit 079a6e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/liballoc/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1734,7 +1734,7 @@ impl str {
17341734
/// A more complex pattern, using a closure:
17351735
///
17361736
/// ```
1737-
/// assert_eq!("1fooX".trim_left_matches(|c| c == '1' || c == 'X'), "fooX");
1737+
/// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
17381738
/// ```
17391739
#[stable(feature = "rust1", since = "1.0.0")]
17401740
pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str

0 commit comments

Comments
 (0)