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

Fix invalid src url #37727

Merged
merged 1 commit into from
Nov 12, 2016
Merged

Fix invalid src url #37727

merged 1 commit into from
Nov 12, 2016

Conversation

GuillaumeGomez
Copy link
Member

Fixes #37684.

Thanks to @eddyb's help.

r? @eddyb

@@ -550,15 +550,15 @@ macro_rules! unimplemented {
/// into libsyntax itself.
///
/// For more information, see documentation for `std`'s macros.
#[cfg(dox)]
pub mod builtin {
mod builtin {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong, doesn't removing pub affect the docs? I could be wrong though.

@eddyb eddyb added beta-nominated Nominated for backporting to the compiler in the beta channel. T-tools labels Nov 11, 2016
@eddyb
Copy link
Member

eddyb commented Nov 11, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Nov 11, 2016

📌 Commit 248a3d9 has been approved by eddyb

eddyb added a commit to eddyb/rust that referenced this pull request Nov 12, 2016
bors added a commit that referenced this pull request Nov 12, 2016
@bors bors merged commit 248a3d9 into rust-lang:master Nov 12, 2016
@GuillaumeGomez GuillaumeGomez deleted the invalid_src branch November 12, 2016 19:50
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.
@brson
Copy link
Contributor

brson commented Dec 10, 2016

Reviewing for backport I don't understand why this patch fixes the linked issue. What is the effect of this patch?

@brson
Copy link
Contributor

brson commented Dec 10, 2016

Please review for backport.

@eddyb
Copy link
Member

eddyb commented Dec 10, 2016

@brson This patch avoids an item (the mod) being conditionally present, which changes the compiler-internal DefId's that rustdoc used for linking to source across crates.
It's a minimal hack, reverting the accidental side-effect of adding these docs.
On nightly, #37954 fixed the underlying design problem but is too large to backport.

@rust-lang/tools Any objections to backporting this workaround?

@alexcrichton
Copy link
Member

Yeah this seems fine to backport.

@alexcrichton alexcrichton added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed I-nominated labels Dec 11, 2016
@brson
Copy link
Contributor

brson commented Dec 14, 2016

Thanks for the explanation @eddyb. Thanks @GuillaumeGomez .

@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants