-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 bug where private item with intermediate doc hidden re-export was not inlined #112178
Merged
bors
merged 3 commits into
rust-lang:master
from
GuillaumeGomez:fix-inline-private-intermediate
Jun 4, 2023
Merged
Fix bug where private item with intermediate doc hidden re-export was not inlined #112178
bors
merged 3 commits into
rust-lang:master
from
GuillaumeGomez:fix-inline-private-intermediate
Jun 4, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e-export was not inlined
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Jun 1, 2023
GuillaumeGomez
changed the title
Fix inline private intermediate
Fix bug where private item with intermediate doc hidden re-export was not inlined
Jun 1, 2023
This comment has been minimized.
This comment has been minimized.
Fixed CI. |
notriddle
reviewed
Jun 3, 2023
GuillaumeGomez
force-pushed
the
fix-inline-private-intermediate
branch
from
June 3, 2023 17:57
ca8a476
to
d029800
Compare
Applied suggestion. |
@bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jun 3, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 4, 2023
…intermediate, r=notriddle Fix bug where private item with intermediate doc hidden re-export was not inlined This fixes this bug: ```rust mod private { /// Original. pub struct Bar3; } /// Hidden. #[doc(hidden)] pub use crate::private::Bar3; /// Visible. pub use self::Bar3 as Reexport; ``` In this case, `private::Bar3` should be inlined and renamed `Reexport` but instead we have: ``` pub use self::Bar3 as Reexport; ``` and no links. There were actually two issues: the first one is that we forgot to check if the next intermediate re-export was doc hidden. The second was that we made the `#[doc(hidden)]` attribute inheritable, which shouldn't be possible. r? `@notriddle`
@bors r- might cause stack overflow here? #112264 (comment) |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Jun 4, 2023
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Jun 4, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 4, 2023
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#109093 (add `#[doc(alias="flatmap")]` to `Option::and_then`) - rust-lang#110701 (Fix `x test core` when download-rustc is enabled) - rust-lang#111982 (Revert "Enable incremental independent of stage") - rust-lang#112158 (Add portable-simd mention) - rust-lang#112172 (doc: improve explanation) - rust-lang#112178 (Fix bug where private item with intermediate doc hidden re-export was not inlined) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 15, 2023
…ddle Add chapter in rustdoc book for re-exports and add a regression test for `#[doc(hidden)]` behaviour Fixes rust-lang#109449. Fixes rust-lang#53417. After the discussion in rust-lang#109697, I made a few PRs to fix a few corner cases: * rust-lang#112178 * rust-lang#112108 * rust-lang#111997 With this I think I covered all cases. Only thing missing at this point was a chapter covering re-exports in the rustdoc book. r? `@notriddle`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes this bug:
In this case,
private::Bar3
should be inlined and renamedReexport
but instead we have:and no links.
There were actually two issues: the first one is that we forgot to check if the next intermediate re-export was doc hidden. The second was that we made the
#[doc(hidden)]
attribute inheritable, which shouldn't be possible.r? @notriddle