about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/enum-tuple.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-21 16:54:04 +0200
committerGitHub <noreply@github.com>2022-08-21 16:54:04 +0200
commit5518b6b686abf5d28def94fdf3ece5e83348be05 (patch)
tree0c378ef316a28e2c74e2c100d633ab1e634a8b7e /src/test/rustdoc-ui/coverage/enum-tuple.rs
parent9cf3bacfb26a396d8d3ceaa8f9b709f6da9e359c (diff)
parent7ab8e0cbe4c6e7617fe43a44467c463fad3b010e (diff)
downloadrust-5518b6b686abf5d28def94fdf3ece5e83348be05.tar.gz
rust-5518b6b686abf5d28def94fdf3ece5e83348be05.zip
Rollup merge of #100775 - GuillaumeGomez:reduce-span-v2, r=notriddle
rustdoc: Merge source code pages HTML elements together v2

This is the follow-up of https://github.com/rust-lang/rust/pull/100429.

I strongly recommend to review it one commit at a time because otherwise it's a lot at once.

For these ones, on each page, I run this JS: `document.getElementsByTagName('*').length`. The goal is to count the number of DOM elements. I took some pages that seemed big, but don't hesitate to check some others. I also added the "starting point" because it's quite nice to see how much the page was reduced thanks to these two PRs.

| file name | before #100429 | before this PR | with this PR | diff |
|-|-|-|-|-|
| std/lib.rs.html (source link on std crate page) | 3455 | 2332 | 1772 | 24% |
| alloc/vec/mod.rs.html (source on Vec type page) | 11012 | 5982 | 5833 | 2.5% |
| alloc/string.rs.html (source on String type page) | 10800 | 6010 | 5822 | 3.2% |
| std/sync/mutex.rs.html (source on Mutex type page) | 2953 | 2041 | 2038 | 0.1% |

So unsurprisingly, the more attributes you have, the bigger the difference.

You can test it [here](https://rustdoc.crud.net/imperio/reduce-span-v2/src/std/lib.rs.html).

cc ``````@jsha``````
r? ``````@notriddle``````
Diffstat (limited to 'src/test/rustdoc-ui/coverage/enum-tuple.rs')
0 files changed, 0 insertions, 0 deletions