rust/library/alloc
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
..
benches Update expressions where we can use array's IntoIterator implementation 2021-06-02 16:09:04 +06:00
src Rollup merge of #85970 - jsha:remove-methods-implementors, r=GuillaumeGomez 2021-06-17 21:56:42 +09:00
tests Rollup merge of #85930 - mominul:array_into_iter, r=m-ou-se 2021-06-06 19:11:19 +09:00
Cargo.toml Add support for const operands and options to global_asm! 2021-05-13 22:31:57 +01:00