-
Notifications
You must be signed in to change notification settings - Fork 13.8k
rustdoc: make #[doc(hidden)]
render the same as other attrs
#145818
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
base: master
Are you sure you want to change the base?
Conversation
Makes `#[doc(hidden)]` render the same as other attrs, instead of being rendered it the same line like visibility specifiers (`pub` etc.). This only has effect when unstable flag `document-hidden-items` is on, as otherwise items with this attr wouldn't be rendered at all. Also makes `#[doc(hidden)]` render for `macro_rules!`.
Normally we have a specific display for this attribute, so we don't want to display it with the other attributes. |
It's the same for private items: it's only displayed at the module levels for types. We can add a sentence under the type declaration mentioning (with the ghost for the hidden items) that it's a hidden item. |
Since I created the linked issue, my 2¢ are that users rarely want to use |
I agree with you. However, So as such, I think |
☔ The latest upstream changes (presumably #146879) made this pull request unmergeable. Please resolve the merge conflicts. |
Makes
#[doc(hidden)]
render the same as other attrs, instead of being rendered it the same line like visibility specifiers (pub
etc.).This only has effect when unstable flag
document-hidden-items
is on, as otherwise items with this attr wouldn't be rendered at all.Also makes
#[doc(hidden)]
render formacro_rules!
.Fixes #132304.
r? @GuillaumeGomez
Before:


After:
Before:


After: