Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
eddyb:rustdoc-2
Nov 30, 2016
Merged

rustdoc: link to cross-crate sources directly.#37954
bors merged 2 commits into
rust-lang:masterfrom
eddyb:rustdoc-2

Conversation

@eddyb

@eddyb eddyb commented Nov 23, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

r? @arielb1

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

@eddyb

eddyb commented Nov 23, 2016

Copy link
Copy Markdown
Contributor Author

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

eddyb commented Nov 24, 2016

Copy link
Copy Markdown
Contributor Author

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

@bors

bors commented Nov 24, 2016

Copy link
Copy Markdown
Collaborator

☔ 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

bors commented Nov 28, 2016

Copy link
Copy Markdown
Collaborator

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

@alexcrichton

Copy link
Copy Markdown
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

eddyb commented Nov 28, 2016

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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

eddyb commented Nov 28, 2016

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Member

@bors: r+

Yay!

@bors

bors commented Nov 28, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit a4f298c has been approved by alexcrichton

@bors

bors commented Nov 29, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a4f298c with merge 28c2007...

@eddyb

eddyb commented Nov 29, 2016

Copy link
Copy Markdown
Contributor Author

Ugh it will fail. @bors r- force

@bors

bors commented Nov 29, 2016

Copy link
Copy Markdown
Collaborator

⛄ The build was interrupted to prioritize another pull request.

@eddyb

eddyb commented Nov 29, 2016

Copy link
Copy Markdown
Contributor Author

@bors r=alexcrichton

@bors

bors commented Nov 29, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit acebd21 has been approved by alexcrichton

@eddyb

eddyb commented Nov 29, 2016

Copy link
Copy Markdown
Contributor Author

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

@bors

bors commented Nov 29, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit acebd21 with merge 095d42a...

@bors

bors commented Nov 29, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-linux-64-cargotest

@eddyb

eddyb commented Nov 29, 2016

Copy link
Copy Markdown
Contributor Author

@bors r=alexcrichton

@bors

bors commented Nov 29, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit cee55ef has been approved by alexcrichton

@bors

bors commented Nov 30, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit cee55ef with merge ec526a5...

@eddyb

eddyb commented Nov 30, 2016

Copy link
Copy Markdown
Contributor Author

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

@bors

bors commented Nov 30, 2016

Copy link
Copy Markdown
Collaborator

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

@eddyb

eddyb commented Nov 30, 2016

Copy link
Copy Markdown
Contributor Author

@bors r=alexcrichton

@bors

bors commented Nov 30, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 9001918 has been approved by alexcrichton

@bors

bors commented Nov 30, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 9001918 with merge f5b3437...

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry force clean

restarted buildbot

@bors

bors commented Nov 30, 2016

Copy link
Copy Markdown
Collaborator

⌛ 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