Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved help message for rustdoc::broken_intra_doc_links #132788

Open
3 tasks
lolbinarycat opened this issue Nov 8, 2024 · 0 comments
Open
3 tasks

improved help message for rustdoc::broken_intra_doc_links #132788

lolbinarycat opened this issue Nov 8, 2024 · 0 comments
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name 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.

Comments

@lolbinarycat
Copy link
Contributor

lolbinarycat commented Nov 8, 2024

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

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 8, 2024
@lolbinarycat lolbinarycat added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name 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.
Projects
None yet
Development

No branches or pull requests

2 participants