@@ -2082,6 +2082,12 @@ impl<T> [T] {
2082
2082
/// [`Result::Err`] is returned, containing the index where a matching
2083
2083
/// element could be inserted while maintaining sorted order.
2084
2084
///
2085
+ /// See also [`binary_search_by`], [`binary_search_by_key`], and [`partition_point`].
2086
+ ///
2087
+ /// [`binary_search_by`]: #method.binary_search_by
2088
+ /// [`binary_search_by_key`]: #method.binary_search_by_key
2089
+ /// [`partition_point`]: #method.partition_point
2090
+ ///
2085
2091
/// # Examples
2086
2092
///
2087
2093
/// Looks up a series of four elements. The first is found, with a
@@ -2129,6 +2135,12 @@ impl<T> [T] {
2129
2135
/// [`Result::Err`] is returned, containing the index where a matching
2130
2136
/// element could be inserted while maintaining sorted order.
2131
2137
///
2138
+ /// See also [`binary_search`], [`binary_search_by_key`], and [`partition_point`].
2139
+ ///
2140
+ /// [`binary_search`]: #method.binary_search
2141
+ /// [`binary_search_by_key`]: #method.binary_search_by_key
2142
+ /// [`partition_point`]: #method.partition_point
2143
+ ///
2132
2144
/// # Examples
2133
2145
///
2134
2146
/// Looks up a series of four elements. The first is found, with a
@@ -2186,7 +2198,12 @@ impl<T> [T] {
2186
2198
/// [`Result::Err`] is returned, containing the index where a matching
2187
2199
/// element could be inserted while maintaining sorted order.
2188
2200
///
2201
+ /// See also [`binary_search`], [`binary_search_by`], and [`partition_point`].
2202
+ ///
2189
2203
/// [`sort_by_key`]: #method.sort_by_key
2204
+ /// [`binary_search`]: #method.binary_search
2205
+ /// [`binary_search_by`]: #method.binary_search_by
2206
+ /// [`partition_point`]: #method.partition_point
2190
2207
///
2191
2208
/// # Examples
2192
2209
///
@@ -3399,19 +3416,23 @@ impl<T> [T] {
3399
3416
/// If this slice is not partitioned, the returned result is unspecified and meaningless,
3400
3417
/// as this method performs a kind of binary search.
3401
3418
///
3419
+ /// See also [`binary_search`], [`binary_search_by`], and [`binary_search_by_key`].
3420
+ ///
3421
+ /// [`binary_search`]: #method.binary_search
3422
+ /// [`binary_search_by`]: #method.binary_search_by
3423
+ /// [`binary_search_by_key`]: #method.binary_search_by_key
3424
+ ///
3402
3425
/// # Examples
3403
3426
///
3404
3427
/// ```
3405
- /// #![feature(partition_point)]
3406
- ///
3407
3428
/// let v = [1, 2, 3, 3, 5, 6, 7];
3408
3429
/// let i = v.partition_point(|&x| x < 5);
3409
3430
///
3410
3431
/// assert_eq!(i, 4);
3411
3432
/// assert!(v[..i].iter().all(|&x| x < 5));
3412
3433
/// assert!(v[i..].iter().all(|&x| !(x < 5)));
3413
3434
/// ```
3414
- #[ unstable ( feature = "partition_point" , reason = "new API" , issue = "73831 ") ]
3435
+ #[ stable ( feature = "partition_point" , since = "1.52.0 " ) ]
3415
3436
pub fn partition_point < P > ( & self , mut pred : P ) -> usize
3416
3437
where
3417
3438
P : FnMut ( & T ) -> bool ,
0 commit comments