9521da7179
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` |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |