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

Add chapter in rustdoc book for re-exports and add a regression test for #[doc(hidden)] behaviour #112304

Merged
merged 2 commits into from
Jun 15, 2023

Conversation

GuillaumeGomez
Copy link
Member

Fixes #109449.
Fixes #53417.

After the discussion in #109697, I made a few PRs to fix a few corner cases:

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

@rustbot 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 5, 2023
Comment on lines 236 to 237
For name-based imports (such as `use module::Item as ModuleItem`), hiding an item acts the same as
making it private. For glob-based imports (such as `use module::*`), hidden items are not inlined.
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't really true any more, since doc(hidden) doesn't really act like making an item private any more.

Copy link
Member Author

Choose a reason for hiding this comment

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

Arf, missed that one.

In the generated documentation, you will see a re-export at the crate root and not the type
directly.

## Attributes
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember that this section was considered hard to understand, and needed replaced.

Now that there's so much detailed description above it, this section should probably just be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually think it's important to talk about "attribute inheritance". I think it can be simplified a lot though.

@GuillaumeGomez
Copy link
Member Author

Improved documentation and fixed the one I missed.

@GuillaumeGomez GuillaumeGomez requested a review from notriddle June 7, 2023 11:50
@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 14, 2023

📌 Commit 44b1365 has been approved by notriddle

It is now in the queue for this repository.

@bors 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 14, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#111212 (Add casting suggestion when assigning negative 2's complement bin or hex literal to a size compatible signed integer)
 - rust-lang#112304 (Add chapter in rustdoc book for re-exports and add a regression test for `#[doc(hidden)]` behaviour)
 - rust-lang#112486 (Fix suggestion for E0404 not dealing with multiple generics)
 - rust-lang#112562 (rustdoc-gui: allow running on Windows)
 - rust-lang#112621 (Mention `env!` in `option_env!`'s docs)
 - rust-lang#112634 (add InlineConst check)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9bc95a4 into rust-lang:master Jun 15, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 15, 2023
@GuillaumeGomez GuillaumeGomez deleted the re-exports branch June 15, 2023 19:14
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.
Projects
None yet
4 participants