rustdoc: provide option to turn intra-link resolution errors into proper errors
QuietMisdreavus opened this issue · 5 comments
When rendering docs for the standard library just now, i noticed some warnings come out of rustdoc. It would be prudent to make these force rustdoc to fail, so they would cause CI to fail. We did something similar during the Markdown transition with a temporary flag, --deny-rendering-differences, so i imagine it would work out the same.
Or to just add a deny-warning option (because more warnings will come!).
In my head, adding a blanket "deny everything rustdoc emits on its own" comes dangerously close to rustdoc having to manage its own lint system, complete with collecting all their names, adding allow/warn/deny/forbid levels and flags, adding some crate attributes like #![doc(deny(intra_link_resolution))], and the like. Such a thing is valuable, but at that point we'd be better off folding it into #46844.
We have already a huge part merged into rustdoc (we needed it for ui tests). So I think at this point that we could just add the missing parts (which shouldn't be too numerous...).
With the warning having been converted to a full lint, could this issue be considered solved? Do we have command-line flags for allow/warn/deny/forbid yet?
No we don't. I'll add it as well.