-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
8099ebc
to
44b1365
Compare
Improved documentation and fixed the one I missed. |
@bors r+ rollup |
…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
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