about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorVillSnow <vill.snow@gmail.com>2020-06-21 18:54:55 +0900
committerVillSnow <vill.snow@gmail.com>2020-06-21 18:54:55 +0900
commitc9b49157057a83a97801f9e726ed8051fb1d2231 (patch)
tree6b26b84f35d50bc00a7ec9706102ee8194ac7e89 /src/libcore
parent4c8ce48a15c88715955e56c9c35959d9dffad5ec (diff)
downloadrust-c9b49157057a83a97801f9e726ed8051fb1d2231.tar.gz
rust-c9b49157057a83a97801f9e726ed8051fb1d2231.zip
fix: doc test
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/slice/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index fe472092b10..13e5ef9ec6f 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -2676,11 +2676,11 @@ impl<T> [T] {
     /// #![feature(partition_point)]
     ///
     /// let v = [1, 2, 3, 3, 5, 6, 7];
-    /// let i = xs.partition_point(|&x| x < 5);
+    /// let i = v.partition_point(|&x| x < 5);
     ///
     /// assert_eq!(i, 4);
-    /// assert!(xs[..i].iter().all(|&x| x < 5));
-    /// assert!(xs[i..].iter().all(|&x| !(x < 5)));
+    /// assert!(v[..i].iter().all(|&x| x < 5));
+    /// assert!(v[i..].iter().all(|&x| !(x < 5)));
     /// ```
     #[unstable(feature = "partition_point", reason = "new API", issue = "99999")]
     pub fn partition_point<P>(&self, mut pred: P) -> usize