about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorBenjamin Hoffmeyer <hoffmeyer25@gmail.com>2017-11-20 13:47:42 -0500
committerGitHub <noreply@github.com>2017-11-20 13:47:42 -0500
commitf69d4d44d8de9edbf94e240bbd2ba252c6937179 (patch)
treea46317efe490df49be05987b1007c933b982a880 /src/liballoc
parentb3baa835fc4f92376c1528fc7f0ea7e988773fee (diff)
downloadrust-f69d4d44d8de9edbf94e240bbd2ba252c6937179.tar.gz
rust-f69d4d44d8de9edbf94e240bbd2ba252c6937179.zip
Fix result for assert_eq
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index 026825b3275..6e8515f0b36 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -1734,7 +1734,7 @@ impl str {
     /// A more complex pattern, using a closure:
     ///
     /// ```
-    /// assert_eq!("1fooX".trim_right_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