Skip to content

Commit 99cd6f4

Browse files
authored
Rollup merge of #100922 - GuillaumeGomez:rewrite-error-index, r=notriddle
Rewrite error index generator to greatly reduce the size of the pages Fixes rust-lang/rust#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``
2 parents 72b42ef + 5200214 commit 99cd6f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/marker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ pub trait StructuralEq {
343343
/// If you try to implement `Copy` on a struct or enum containing non-`Copy` data, you will get
344344
/// the error [E0204].
345345
///
346-
/// [E0204]: ../../error-index.html#E0204
346+
/// [E0204]: ../../error_codes/E0204.html
347347
///
348348
/// ## When *should* my type be `Copy`?
349349
///

core/src/ops/drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pub trait Drop {
156156
/// handled by the compiler, but when using unsafe code, can sometimes occur
157157
/// unintentionally, particularly when using [`ptr::drop_in_place`].
158158
///
159-
/// [E0040]: ../../error-index.html#E0040
159+
/// [E0040]: ../../error_codes/E0040.html
160160
/// [`panic!`]: crate::panic!
161161
/// [`mem::drop`]: drop
162162
/// [`ptr::drop_in_place`]: crate::ptr::drop_in_place

0 commit comments

Comments
 (0)