Warn on using intra-doc links on stable #63305
Labels
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
It would be a significant effort to implement feature-gates in Rustdoc just for intra-doc links so I understand why that hasn't been done.
However, because there is no warning I've been unintentionally creating docs with broken links on stable for a while now. I haven't observed this myself because I prefer nightly compilers and assume it works on stable if there's no feature flags, and docs.rs uses a nightly compiler as well so published docs work fine. It should be relatively easy to produce this warning on stable as most of the same logic already exists to tell the difference between a real URL and an item path: https://github.com/rust-lang/rust/blob/master/src/librustdoc/passes/collect_intra_doc_links.rs#L277
This has caught at least one other user by surprise as well: https://www.reddit.com/r/rust/comments/cm7rhv/hey_rustaceans_got_an_easy_question_ask_here/ew0nvo2/?context=1000
The text was updated successfully, but these errors were encountered: