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

Missing inlining for private re-export #109258

Closed
GuillaumeGomez opened this issue Mar 17, 2023 · 0 comments · Fixed by #109259
Closed

Missing inlining for private re-export #109258

GuillaumeGomez opened this issue Mar 17, 2023 · 0 comments · Fixed by #109259
Assignees
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@GuillaumeGomez
Copy link
Member

This code is failing:

pub use crate::bar::Foo;
pub mod bar;

// bar/mod.rs
mod priv_mod;
pub use self::priv_mod::Foo;

// bar/priv_mod.rs
pub struct Foo;

Foo should be inlined in bar but isn't. The regression appeared in #108870.

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 17, 2023
@GuillaumeGomez GuillaumeGomez self-assigned this Mar 17, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Mar 17, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2023
…-inlining, r=notriddle

rustdoc: Fix missing private inlining

Fixes rust-lang#109258.

If the item isn't inlined, it shouldn't have been added into `view_item_stack`. The problem here was that it was not removed, preventing sub items to be inlined if they have a re-export in "upper levels".

cc `@epage`
r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2023
…-inlining, r=notriddle

rustdoc: Fix missing private inlining

Fixes rust-lang#109258.

If the item isn't inlined, it shouldn't have been added into `view_item_stack`. The problem here was that it was not removed, preventing sub items to be inlined if they have a re-export in "upper levels".

cc ``@epage``
r? ``@notriddle``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2023
…-inlining, r=notriddle

rustdoc: Fix missing private inlining

Fixes rust-lang#109258.

If the item isn't inlined, it shouldn't have been added into `view_item_stack`. The problem here was that it was not removed, preventing sub items to be inlined if they have a re-export in "upper levels".

cc ```@epage```
r? ```@notriddle```
@bors bors closed this as completed in c076799 Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant