Skip to content

Unify error reporting for intra-doc links #75836

Closed
@jyn514

Description

@jyn514

Right now there are two places that deal with disambiguators:

  1. The one I wrote in Disallow linking to items with a mismatched disambiguator #75079:
    let help_msg = format!("to link to the {}, use its disambiguator", kind.descr(id));
  2. &format!("to link to the {}, {}", res.descr(), action),

    which @euclio wrote in refactor and reword intra-doc link errors #74528. I didn't notice the second one even though I reviewed refactor and reword intra-doc link errors #74528 🙈.

It would be great to unify these into one function so the errors reported are consistent; I ran into some trouble with this in #75815 (comment).

Metadata

Metadata

Assignees

Labels

A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions