Closed
Description
(Sorry, I couldn’t invent 30 more.)
I have a massive list of bad links from crawling doc.rust-lang.org (1307 of them). Most of them arise from bugs in rustdoc, though a few are bad from other manual causes.
Here are the some patterns that I have identified that cause them and which I have omitted from the data set below:
- There are 165 links of the form
Some(…)
are being produced inrustdoc::html::render::item_module
, whereitem.href()
(anOption<String>
) is being written directly without unwrapping. rustdoc: Create anchor pages for primitive types #14513 - The
implementors/….js
pattern accounts for 247 404s, because there is no stub JS file if nothing implements the trait. I am not fond of the technique being used, but given it in its current state, we should produce stub JS files that simply do nothing, to avoid a 404. - There are 42 with a
?gotosrc=…
in them, omitted as I am informed that it has been fixed, just that the online docs haven’t been updated yet. rustdoc: cross-crate source links are one level lower. #14458
Some other observations:
- The links in trait implementations appear at a brief look-over to be causing the most problems. Most of the links that I have not categorised probably boil down to just a few bugs in this area; here are two I have identified:
- Getting the private path (e.g.
serialize::serialize::Encodable
rather than its canonical public path,serialize::Encodable
; I have omitted 771 (!) broken links forserialize::serialize
, 8 forstd::io::mem::MemWriter
, and probably more of the remaining ones are from this same thing); rustdoc: Create anchor pages for primitive types #14513 - Including private (e.g.
HomingIO
which is in a private module) and/or#[doc(hidden)]
(e.g.RcBoxPtr
) traits in the “traits this type implements” section;
- Getting the private path (e.g.
- We used to have
enum.Result.html
, now all enums aretype.Result.html
. This has broken manual links both inside the documentation (15, by the looks of it) and outside the documentation, and should be reverted.
Anyway, here’s the list of ones that I haven’t removed for reasons mentioned above:
Metadata
Metadata
Assignees
Labels
No labels