improved help message for rustdoc::broken_intra_doc_links
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Currently, the only suggestion rustdoc gives is to simply escape [ and ] with backslashes, or if there is a similarly-named item, to link to that instead.
there are a few other common errors that it could catch though:
- code snippets (like
arr[idx+3]) should be surrounded by backticks instead of escaping each bracket individually - if there is a similarly-named link reference definition, it should suggest referencing that (probable typo)
- if the type that is being linked to is outside the current documentation bundle (e.g. linking to a type in an alternative library for the purpose of comparison, or linking to a non-rust type), then it should recommend adding a link definition item.
inspired by discussion on #132748
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the rustdoc::broken_intra_doc_links diagnostic and the discussion in #132748. Review how its current escaping and similarly named-item suggestions are produced, then cover the three listed cases with appropriate guidance. Done means rustdoc offers targeted suggestions for code snippets, link reference definitions, and types outside the current documentation bundle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100