From c9b49157057a83a97801f9e726ed8051fb1d2231 Mon Sep 17 00:00:00 2001 From: VillSnow Date: Sun, 21 Jun 2020 18:54:55 +0900 Subject: [PATCH] fix: doc test --- src/libcore/slice/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index fe472092b10c..13e5ef9ec6fc 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -2676,11 +2676,11 @@ impl [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

(&self, mut pred: P) -> usize