-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
rustdoc: render doc(hidden) as a code attribute #151001
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: main
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @GuillaumeGomez. Use |
Move `#[doc(hidden)]` into the shared code-attribute renderer so it matches the styling and placement of other attributes in rustdoc HTML.
719dca9 to
d88a903
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
| use crate::html::format::print_anchor; | ||
|
|
||
| let visibility_and_hidden = visibility_and_hidden(myitem); | ||
| write!(w, "<dt><code>")?; |
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.
Please move this into render_attributes_in_code so we don't write <dt><code> if there are no attributes.
| //@ has - '//dt/span[@title="Hidden item"]' '👻' | ||
|
|
||
| //@ has - '//*[@id="reexport.hidden_reexport"]/code' '#[doc(hidden)] pub use hidden::inside_hidden as hidden_reexport;' | ||
| //@ matchesraw 'foo/index.html' '(?s)<dt><code><div class="code-attribute">#\[doc\(hidden\)\]</div>pub extern crate .*?hidden_(?:<wbr>)?core;</code><span title="Hidden item"> 👻</span> </dt>' |
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.
It's not supposed to have the #[doc(hidden)] attribute since there is the ghost.
Move
#[doc(hidden)]into the shared code-attribute renderer so it matches the styling and placement of other attributes in rustdoc HTML.Closes #132304