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

rustdoc: link to cross-crate sources directly. #37954

Merged
merged 2 commits into from
Nov 30, 2016
Merged

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Nov 23, 2016

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.

@rust-highfive
Copy link
Collaborator

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member Author

eddyb commented Nov 23, 2016

r? @alexcrichton

@eddyb eddyb force-pushed the rustdoc-2 branch 6 times, most recently from 436c12e to 04e6785 Compare November 24, 2016 03:16
@eddyb
Copy link
Member Author

eddyb commented Nov 24, 2016

@rust-lang/tools This is ready for review.

@bors
Copy link
Contributor

bors commented Nov 24, 2016

☔ The latest upstream changes (presumably #37890) made this pull request unmergeable. Please resolve the merge conflicts.

@eddyb eddyb force-pushed the rustdoc-2 branch 2 times, most recently from d07e718 to 56355fe Compare November 24, 2016 21:54
@bors
Copy link
Contributor

bors commented Nov 28, 2016

☔ The latest upstream changes (presumably #37676) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member

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?

@eddyb
Copy link
Member Author

eddyb commented Nov 28, 2016

@alexcrichton What's a sure way to get all the docs built as for a release (but stage1 if possible)?
I'll rebase and try to put them up somewhere afterwards.

@alexcrichton
Copy link
Member

@eddyb

x.py doc --stage 1

@eddyb eddyb force-pushed the rustdoc-2 branch 2 times, most recently from 2cc7717 to a4f298c Compare November 28, 2016 20:04
@eddyb
Copy link
Member Author

eddyb commented Nov 28, 2016

@alexcrichton I've had to tweak it to get it to actually work properly, but that means cleaner src paths!
Demo: http://f.nathan7.eu/15e29afdb683592956189630f288705aba432bea/std/

@alexcrichton
Copy link
Member

@bors: r+

Yay!

@bors
Copy link
Contributor

bors commented Nov 28, 2016

📌 Commit a4f298c has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 29, 2016

⌛ Testing commit a4f298c with merge 28c2007...

@eddyb
Copy link
Member Author

eddyb commented Nov 29, 2016

Ugh it will fail. @bors r- force

@bors
Copy link
Contributor

bors commented Nov 29, 2016

⛄ The build was interrupted to prioritize another pull request.

@eddyb
Copy link
Member Author

eddyb commented Nov 29, 2016

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Nov 29, 2016

📌 Commit acebd21 has been approved by alexcrichton

@eddyb
Copy link
Member Author

eddyb commented Nov 29, 2016

(Travis failed for a skipped musl build for some reason - but the real PR build succeeded.)

@bors
Copy link
Contributor

bors commented Nov 29, 2016

⌛ Testing commit acebd21 with merge 095d42a...

@bors
Copy link
Contributor

bors commented Nov 29, 2016

💔 Test failed - auto-linux-64-cargotest

@eddyb
Copy link
Member Author

eddyb commented Nov 29, 2016

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Nov 29, 2016

📌 Commit cee55ef has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 30, 2016

⌛ Testing commit cee55ef with merge ec526a5...

@eddyb
Copy link
Member Author

eddyb commented Nov 30, 2016

Argh! Travis failed and I forgot to check. @bors r-

@bors
Copy link
Contributor

bors commented Nov 30, 2016

💔 Test failed - auto-win-msvc-64-cargotest

@eddyb
Copy link
Member Author

eddyb commented Nov 30, 2016

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Nov 30, 2016

📌 Commit 9001918 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 30, 2016

⌛ Testing commit 9001918 with merge f5b3437...

@alexcrichton
Copy link
Member

@bors: retry force clean

restarted buildbot

@bors
Copy link
Contributor

bors commented Nov 30, 2016

⌛ Testing commit 9001918 with merge 3abaf43...

bors added a commit that referenced this pull request Nov 30, 2016
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[src] links in beta and nightly documentation are broken
5 participants