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

Unify error reporting for intra-doc links #75836

Closed
jyn514 opened this issue Aug 23, 2020 · 1 comment · Fixed by #75916
Closed

Unify error reporting for intra-doc links #75836

jyn514 opened this issue Aug 23, 2020 · 1 comment · Fixed by #75916
Assignees
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 23, 2020

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).

@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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 labels Aug 23, 2020
@jyn514 jyn514 self-assigned this Aug 23, 2020
@jyn514
Copy link
Member Author

jyn514 commented Aug 25, 2020

Now that I think about this, maybe this should be fixed before #75756 gets merged ...

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 29, 2020
 Unify error reporting for intra-doc links

- Give a suggestion even if there is no span available
- Give a more accurate description of the change than 'use the
disambiguator'
- Write much less code

Closes rust-lang#75836.
r? @euclio
cc @pickfire - this gets rid of 'disambiguator' like you suggested in rust-lang#75079 (comment).
@bors bors closed this as completed in 1dc748f Aug 29, 2020
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-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant