mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Rollup merge of #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.
This commit is contained in:
commit
079a6e4cc2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user