rust/library/alloc/src
Yuki Okushi 9521da7179
Rollup merge of #85970 - jsha:remove-methods-implementors, r=GuillaumeGomez
Remove methods under Implementors on trait pages

As discussed at https://github.com/rust-lang/rust/issues/84326#issuecomment-842652412.

On a trait page, the "Implementors" section currently lists all methods of each implementor. That duplicates the method definitions on the trait itself, and is usually not very useful. So the implementors are collapsed by default. This PR changes rustdoc to just not render them at all. Any documentation specific to an implementor can be found by clicking through to the implementor's page.

This moves the "portability" info inside the `<summary>` tags so it is still visible on trait pages (as originally implemented in #79201). That also means it will be visible on struct/enum pages when methods are collapsed.

Add `#[doc(hidden)]` to all implementations of `Iterator::__iterator_get_unchecked` that didn't already have it. Otherwise, due to #86145, the structs/enums with those implementations would generate documentation for them, and that documentation would have a broken link into the Iterator page. Those links were already "broken" but not detected by the link-checker, because they pointed to one of the Implementors on the Iterator page, which happened to have the right anchor name.

This reduces the Read trait's page size from 128kB to 68kB (uncompressed) and from 12,125 bytes to 9,989 bytes (gzipped
Demo:

https://hoffman-andrews.com/rust/remove-methods-implementors/std/string/struct.String.html#trait-implementations
https://hoffman-andrews.com/rust/remove-methods-implementors/std/io/trait.Read.html#implementors

r? `@GuillaumeGomez`
2021-06-17 21:56:42 +09:00
..
alloc Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
collections Add doc(hidden) to all __iterator_get_unchecked 2021-06-16 22:08:44 -07:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw_vec Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
rc Re-stabilize Weak::as_ptr &friends for unsized T 2021-01-06 19:30:22 -05:00
sync Rollup merge of #80764 - CAD97:weak-unsized-as-ptr-again, r=RalfJung 2021-01-16 17:29:56 +00:00
vec Add doc(hidden) to all __iterator_get_unchecked 2021-06-16 22:08:44 -07:00
alloc.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
borrow.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
boxed.rs Remove "generic type" in boxed.rs 2021-06-12 04:11:48 +08:00
fmt.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
lib.rs Stabilize maybe_uninit_ref 2021-06-14 05:08:03 +09:00
macros.rs Only define rustc_diagnostic_item format_macro in not(test). 2021-02-14 20:03:13 +01:00
raw_vec.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
rc.rs Rollup merge of #85666 - fee1-dead:document-shared-from-cow, r=dtolnay 2021-05-26 13:31:04 +09:00
slice.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
str.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
string.rs Rollup merge of #85715 - fee1-dead:document-string, r=JohnTitor 2021-06-09 12:03:59 +09:00
sync.rs Rollup merge of #85663 - fee1-dead:document-arc-from, r=m-ou-se 2021-06-17 21:56:39 +09:00
task.rs Document From implementations for Waker and RawWaker 2021-04-22 14:16:33 -07:00
tests.rs Fix alloc::test::test_show 2021-04-21 15:45:41 +02:00