rust/library/core/src
Yuki Okushi 16ce4f7513
Rollup merge of #82950 - mockersf:slice-intra-doc-link, r=jyn514
convert slice doc link to intra-doc links

Continuing where #80189 stopped, with `core::slice`.

I had an issue with two dead links in my doc when implementing `Deref<Target = [T]>` for one of my type. This means that [`binary_search_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key) was available, but not [`sort_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key) even though it was linked in it's doc (same issue with [`as_ptr`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_ptr) and [`as_mut_pbr`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_mut_ptr)). It becomes available if I implement `DerefMut`, as it needs an `&mut self`.

<details>
  <summary>Code that will have dead links in its doc</summary>

```rust
pub struct A;
pub struct B;

impl std::ops::Deref for B{
    type Target = [A];

    fn deref(&self) -> &Self::Target {
        &A
    }
}
```
</details>

I removed the link to `sort_by_key` from `binary_search_by_key` doc as I didn't find a nice way to have a live link:
- `binary_search_by_key` is in `core`
- `sort_by_key` is in `alloc`
- intra-doc link `slice::sort_by_key` doesn't work, as `alloc` is not available when `core` is being build (the warning can't be ignored: ```error[E0710]: an unknown tool name found in scoped lint: `rustdoc::broken_intra_doc_links` ```)
- keeping the link as an anchor `#method.sort_by_key` meant a dead link
- an absolute link would work but doesn't feel right...
2021-03-12 08:55:15 +09:00
..
alloc Rollup merge of #80189 - jyn514:convert-primitives, r=poliorcetics 2021-03-02 21:23:12 +09:00
array Update library/core/src/array/mod.rs 2021-03-08 20:28:30 +05:30
char Convert the rest of the standard library primitives to intra-doc links 2021-02-25 20:32:49 -05:00
convert FloatToInit: Replacing round_unchecked_to --> to_int_unchecked 2021-03-02 12:38:22 -08:00
fmt Stabilize Arguments::as_str 2021-02-14 17:48:51 -05:00
future Use more std:: instead of core:: in docs for consistency, add more intra doc links 2020-12-02 00:41:53 +01:00
hash Use new pointer metadata API inside libcore instead of manual transmutes 2021-02-15 14:27:34 +01:00
iter Prevent Zip specialization from calling __iterator_get_unchecked twice with the same index after calling next_back 2021-03-05 19:03:32 +01:00
macros Implement built-in attribute macro #[cfg_eval] 2021-03-06 23:03:19 +03:00
mem tweak MaybeUninit docs 2021-03-06 16:59:39 +01:00
num Rollup merge of #80189 - jyn514:convert-primitives, r=poliorcetics 2021-03-02 21:23:12 +09:00
ops Fix borrow and deref 2021-03-03 11:23:29 +01:00
prelude Rollup merge of #82217 - m-ou-se:edition-prelude, r=nikomatsakis 2021-03-10 17:55:38 +01:00
ptr improve offset_from docs 2021-03-04 10:05:51 +01:00
slice apply review 2021-03-10 18:32:55 +01:00
str Auto merge of #82043 - tmiasko:may-have-side-effect, r=kennytm 2021-03-02 16:08:32 +00:00
stream Remove Stream::next 2021-01-23 16:54:56 +01:00
sync Convert the rest of the standard library primitives to intra-doc links 2021-02-25 20:32:49 -05:00
task stabilize the poll_map feature 2021-01-13 14:51:27 +10:00
unicode Slightly more explicit 2021-02-12 13:42:42 +00:00
any.rs Apply suggestions from code review 2020-12-09 23:13:24 +00:00
ascii.rs Fixed some intra-docs links in library/core 2020-09-18 07:49:29 +08:00
bool.rs Stabilise then 2020-11-22 13:45:14 +00:00
borrow.rs Fix borrow and deref 2021-03-03 11:23:29 +01:00
cell.rs Rollup merge of #80385 - camelid:clarify-cell-replace-docs, r=Mark-Simulacrum 2021-03-12 08:55:09 +09:00
clone.rs Fix core tests 2021-03-03 11:22:49 +01:00
cmp.rs Added #[repr(transparent)] to core::cmp::Reverse 2021-02-08 12:07:59 +00:00
default.rs Add diagnostic item to Default trait 2021-03-04 10:14:48 -08:00
ffi.rs Convert primitives to use intra-doc links 2021-02-25 20:31:53 -05:00
hint.rs Fixed documentation error 2021-01-03 19:54:54 +02:00
internal_macros.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
intrinsics.rs Rollup merge of #82592 - Lonami:patch-1, r=RalfJung 2021-03-07 10:41:12 +09:00
lazy.rs Capitalize safety comments 2020-09-08 22:26:44 -04:00
lib.rs Rollup merge of #79208 - LeSeulArtichaut:stable-unsafe_op_in_unsafe_fn, r=nikomatsakis 2021-03-10 08:01:25 +09:00
marker.rs Auto merge of #77893 - petertodd:2020-impl-default-for-phantompinned, r=dtolnay 2020-11-23 07:00:30 +00:00
option.rs Rename Option::get_or_insert_default 2021-03-10 09:07:16 -06:00
panic.rs Implement new panic!() behaviour for Rust 2021. 2021-01-25 13:48:11 +01:00
panicking.rs Add assert_matches!(expr, pat). 2021-03-04 18:07:20 +01:00
pin.rs Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw.rs Use intra-doc-links in core::{raw, ffi, pin} 2020-08-22 22:25:27 +02:00
result.rs Rollup merge of #82130 - jhpratt:const-option-result, r=RalfJung 2021-03-07 10:41:09 +09:00
time.rs Replace magic numbers with existing constants 2020-12-11 05:27:52 +00:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
unit.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00