-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
[Rust 2018] rustdoc doesn't link "pub use whatever_crate;" #52509
Comments
Please can someone give this a |
Nominating for prioritization. cc @rust-lang/docs -- this is a rustdoc bug, is there someone who wants to tackle it? I added T-compiler so that we take a look at the next compiler meeting otherwise. |
I'll take a look but I assume it's just a non-backported changes for the module system changes... |
cc @GuillaumeGomez -- any news? |
Busy then sick so nothing, sorry about that. |
discussed at compiler team meeting. Taking off RC2. |
@GuillaumeGomez ok — if you still have time to tackle, great! Otherwise, let us know and we can find someone to take a peek. |
If I haven't finish this week-end, then please please ask someone else. |
I'll see what I can do to help here. |
I think we can modify (This sample was made by applying Alternately, after that check, we could generate a In the immediate term, i guess this issue is now about the eager inlining of external crates as if they were modules inside the current crate, which drives me back to my earlier suggestion. |
T-compiler triage. Tagging P-high. Leaving assigned to self. |
I've opened #55804 to make |
… r=pnkfelix rustdoc: don't inline `pub use some_crate` unless directly asked to cc rust-lang#52509 (fixes it? i'm not sure about my comment summoning the docs team) When rustdoc encounters a `pub use` statement for an item from another crate, it will eagerly inline its contents into your crate. This somewhat clashes with the new paths behavior in Rust 2018, in which crates are implicitly linked and re-exported with `pub use` instead of `pub extern crate`. In rust 2015, `pub extern crate` would only create a single line for its re-export in the docs, so i'm making it do the same with `pub use some_crate;`. The exact new behavior is like this: *If rustdoc sees a `pub use` statement, and the item being imported is the root of another crate, it will only inline it if `#[doc(inline)]` is provided.* I made it only avoid crate roots because otherwise it would stop inlining any module, which may or may not be what people want.
… r=pnkfelix rustdoc: don't inline `pub use some_crate` unless directly asked to cc rust-lang#52509 (fixes it? i'm not sure about my comment summoning the docs team) When rustdoc encounters a `pub use` statement for an item from another crate, it will eagerly inline its contents into your crate. This somewhat clashes with the new paths behavior in Rust 2018, in which crates are implicitly linked and re-exported with `pub use` instead of `pub extern crate`. In rust 2015, `pub extern crate` would only create a single line for its re-export in the docs, so i'm making it do the same with `pub use some_crate;`. The exact new behavior is like this: *If rustdoc sees a `pub use` statement, and the item being imported is the root of another crate, it will only inline it if `#[doc(inline)]` is provided.* I made it only avoid crate roots because otherwise it would stop inlining any module, which may or may not be what people want.
@QuietMisdreavus would you call this a "blocker" for the final release? Do you think we should backport our fixes? |
@nikomatsakis The bug, as it stands today, is benign and has a small workaround, namely adding The broader question of "do we want to adapt docs to look like a different edition from what it was compiled for" is something i wanted to get input from @rust-lang/docs on. If we leave this as-is, we default to "no", but i think we can leave the question open for future work, especially with the edition code freeze just next week. |
I feel like the right thing is "based on the edition passed to rustdoc", but I'd be fine with either, to be honest. |
I said prior on Discord that it'd be nice to have a toggle on the page itself without giving it too much thought. A little more thought, and I realized that since we can |
Removing T-compiler, as it seems that this issue is not critical for Rust2018 and involvement of T-compiler to help getting this fixed ASAP is not necessary. |
@QuietMisdreavus has mentioned on discord that #55804 has fixed this issue enough for the edition, so I'm going to remove it from the milestone and also remove the P-high tag |
Rust 2015 (
1.27.1
)Rust 2018 (preview at
1ecf6929d 2018-07-16
)The text was updated successfully, but these errors were encountered: