@@ -2215,7 +2215,7 @@ impl<T> [T] {
2215
2215
/// Binary searches this sorted slice with a key extraction function.
2216
2216
///
2217
2217
/// Assumes that the slice is sorted by the key, for instance with
2218
- /// `sort_by_key` using the same key extraction function.
2218
+ /// [ `sort_by_key`] using the same key extraction function.
2219
2219
///
2220
2220
/// If the value is found then [`Result::Ok`] is returned, containing the
2221
2221
/// index of the matching element. If there are multiple matches, then any
@@ -2225,6 +2225,7 @@ impl<T> [T] {
2225
2225
///
2226
2226
/// See also [`binary_search`], [`binary_search_by`], and [`partition_point`].
2227
2227
///
2228
+ /// [`sort_by_key`]: slice::sort_by_key
2228
2229
/// [`binary_search`]: slice::binary_search
2229
2230
/// [`binary_search_by`]: slice::binary_search_by
2230
2231
/// [`partition_point`]: slice::partition_point
@@ -2247,6 +2248,10 @@ impl<T> [T] {
2247
2248
/// let r = s.binary_search_by_key(&1, |&(a, b)| b);
2248
2249
/// assert!(match r { Ok(1..=4) => true, _ => false, });
2249
2250
/// ```
2251
+ // Lint rustdoc::broken_intra_doc_links is allowed as `slice::sort_by_key` is
2252
+ // in crate `alloc`, and as such doesn't exists yet when building `core`
2253
+ // links to downstream crate: https://github.com/rust-lang/rust/issues/74481
2254
+ #[ cfg_attr( not( bootstrap) , allow( rustdoc:: broken_intra_doc_links) ) ]
2250
2255
#[ stable( feature = "slice_binary_search_by_key" , since = "1.10.0" ) ]
2251
2256
#[ inline]
2252
2257
pub fn binary_search_by_key < ' a , B , F > ( & ' a self , b : & B , mut f : F ) -> Result < usize , usize >
0 commit comments