rustdoc: make #[doc(hidden)] render the same as other attrs#145818
rustdoc: make #[doc(hidden)] render the same as other attrs#145818karolzwolak wants to merge 1 commit intorust-lang:mainfrom
#[doc(hidden)] render the same as other attrs#145818Conversation
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 (pubetc.).This only has effect when unstable flag
document-hidden-itemsis 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: