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

Improve rustdoc error for failed intra-doc link resolution #77469

Merged
merged 4 commits into from
Oct 4, 2020

Conversation

camelid
Copy link
Member

@camelid camelid commented Oct 2, 2020

The previous error was confusing since it made it sound like you can't
link to items that are defined outside the current module.

Also suggested importing the item.

r? @jyn514

The previous error was confusing since it made it sound like you can't
link to items that are defined outside the current module.

Also suggested importing the item.
@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 2, 2020
@jyn514 jyn514 added A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 2, 2020
@camelid camelid added A-diagnostics Area: Messages for errors, warnings, and lints D-confusing Diagnostics: Confusing error or lint that should be reworked. and removed T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 2, 2020
The new error was confusing when there was partial resolution (something
like `std::io::nonexistent`); the old one is better for those cases.
@camelid camelid added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 3, 2020
@camelid
Copy link
Member Author

camelid commented Oct 3, 2020

Huh, GitHub's labels have been acting up recently; it shows that I removed T-rustdoc after you added it, even though I added it then. I guess there was a race condition? They should use Rust on their backend! ;)

@jyn514
Copy link
Member

jyn514 commented Oct 3, 2020

Yeah, this looks a lot better. r=me with CI passing.

@jyn514
Copy link
Member

jyn514 commented Oct 3, 2020

@bors r+

Thanks for working on this!

@bors
Copy link
Contributor

bors commented Oct 3, 2020

📌 Commit aa9b718 has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 3, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 3, 2020
…rror, r=jyn514

Improve rustdoc error for failed intra-doc link resolution

The previous error was confusing since it made it sound like you can't
link to items that are defined outside the current module.

Also suggested importing the item.

r? @jyn514
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 4, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#75143 (Use `tracing` spans to trace the entire MIR interp stack)
 - rust-lang#75699 (Uplift drop-bounds lint from clippy)
 - rust-lang#76768 (Test and reject out-of-bounds shuffle vectors)
 - rust-lang#77190 (updated p! macro to accept literals)
 - rust-lang#77388 (Add some regression tests)
 - rust-lang#77419 (Create E0777 error code for invalid argument in derive)
 - rust-lang#77447 (BTreeMap: document DrainFilterInner better)
 - rust-lang#77468 (Fix test name)
 - rust-lang#77469 (Improve rustdoc error for failed intra-doc link resolution)
 - rust-lang#77473 (Make --all-targets in x.py check opt-in)
 - rust-lang#77508 (Fix capitalization in blog post name)

Failed merges:

r? `@ghost`
@bors bors merged commit 0ed4849 into rust-lang:master Oct 4, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 4, 2020
@camelid camelid deleted the rustdoc-better-failed-res-error branch October 4, 2020 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name D-confusing Diagnostics: Confusing error or lint that should be reworked. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants