We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3baa83 commit f69d4d4Copy full SHA for f69d4d4
src/liballoc/str.rs
@@ -1734,7 +1734,7 @@ impl str {
1734
/// A more complex pattern, using a closure:
1735
///
1736
/// ```
1737
- /// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "fooX");
+ /// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
1738
1739
#[stable(feature = "rust1", since = "1.0.0")]
1740
pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str
0 commit comments