-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: link to cross-crate sources directly. #37954
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
436c12e
to
04e6785
Compare
@rust-lang/tools This is ready for review. |
☔ The latest upstream changes (presumably #37890) made this pull request unmergeable. Please resolve the merge conflicts. |
d07e718
to
56355fe
Compare
☔ The latest upstream changes (presumably #37676) made this pull request unmergeable. Please resolve the merge conflicts. |
Looks good to me, thanks @eddyb! Do you have a copy of the docs on hand perchance to poke around and ensure everything looks good? |
@alexcrichton What's a sure way to get all the docs built as for a release (but stage1 if possible)? |
|
2cc7717
to
a4f298c
Compare
@alexcrichton I've had to tweak it to get it to actually work properly, but that means cleaner src paths! |
@bors: r+ Yay! |
📌 Commit a4f298c has been approved by |
⌛ Testing commit a4f298c with merge 28c2007... |
Ugh it will fail. @bors r- force |
⛄ The build was interrupted to prioritize another pull request. |
@bors r=alexcrichton |
📌 Commit acebd21 has been approved by |
(Travis failed for a skipped musl build for some reason - but the real PR build succeeded.) |
⌛ Testing commit acebd21 with merge 095d42a... |
💔 Test failed - auto-linux-64-cargotest |
@bors r=alexcrichton |
📌 Commit cee55ef has been approved by |
⌛ Testing commit cee55ef with merge ec526a5... |
Argh! Travis failed and I forgot to check. @bors r- |
💔 Test failed - auto-win-msvc-64-cargotest |
@bors r=alexcrichton |
📌 Commit 9001918 has been approved by |
⌛ Testing commit 9001918 with merge f5b3437... |
@bors: retry force clean restarted buildbot |
rustdoc: link to cross-crate sources directly. Fixes #37684 by implementing proper support for getting the `Span` of definitions across crates. In rustdoc this is used to generate direct links to the original source instead of fragile redirects. This functionality could be expanded further for making error reporting code more uniform and seamless across crates, although at the moment there is no actual source to print, only file/line/column information. Closes #37870 which is also "fixes" #37684 by throwing away the builtin macro docs from libcore. After this lands, #37727 could be reverted, although it doesn't matter much either way.
Fixes #37684 by implementing proper support for getting the
Span
of definitions across crates.In rustdoc this is used to generate direct links to the original source instead of fragile redirects.
This functionality could be expanded further for making error reporting code more uniform and seamless across crates, although at the moment there is no actual source to print, only file/line/column information.
Closes #37870 which is also "fixes" #37684 by throwing away the builtin macro docs from libcore.
After this lands, #37727 could be reverted, although it doesn't matter much either way.