about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/source-script.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-24 18:20:16 +0200
committerGitHub <noreply@github.com>2022-08-24 18:20:16 +0200
commitfe1f1f128253f558e6e509dd1fc06310577bc7e7 (patch)
treea23a7abe4de71b16b0380cf55e4ac20f45a9b6c0 /src/librustdoc/html/static/js/source-script.js
parent8cdf4080c19097ff3fb4e39bb654dd41f61caa24 (diff)
parent4398d9229aea35d5f3b6b8365260ee87304b27b0 (diff)
downloadrust-fe1f1f128253f558e6e509dd1fc06310577bc7e7.tar.gz
rust-fe1f1f128253f558e6e509dd1fc06310577bc7e7.zip
Rollup merge of #100922 - GuillaumeGomez:rewrite-error-index, r=notriddle
Rewrite error index generator to greatly reduce the size of the pages

Fixes https://github.com/rust-lang/rust/issues/100736.

Instead of having all error codes in a same page (making the DOM way too big), I split the output into multiple files and generated a list of links (if there is an explanation) to the error codes' explanation into the already existing file.

I also used this opportunity to greatly simplify the code. Instead of needing a `build.rs`, I simply imported the file we want and wrote the macro which generates a function containing everything we need. We just need to call it to get the error codes and their explanation (if any). Also, considering the implementations between markdown and HTML formats differed even further, the `Formatter` trait was becoming too problematic so I removed it too.

You can test it [here](https://rustdoc.crud.net/imperio/rewrite-error-index/error-index.html).

cc ``@jsha``
r? ``@notriddle``
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
0 files changed, 0 insertions, 0 deletions