Skip to content

improved help message for rustdoc::broken_intra_doc_links #132788

Open

Description

@lolbinarycat

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

Activity

  1. added
    needs-triage
    on Nov 8, 2024
  2. added
    T-rustdoc
    A-intra-doc-links
    C-enhancement
    and removed
    needs-triage
    on Nov 8, 2024
  3. added a commit that references this issue on Nov 9, 2026
  4. added a commit that references this issue on Nov 9, 2026
  5. added 2 commits that reference this issue on Nov 13, 2026
  6. added 2 commits that reference this issue on Nov 13, 2026
  7. added 2 commits that reference this issue on Nov 14, 2026
  8. added a commit that references this issue on Nov 15, 2026
  9. added a commit that references this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intra-doc-linksC-enhancementT-rustdoc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions