-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Visually mark 👻hidden👻 items with document-hidden-items #122495
The head ref may contain hidden characters: "rustdoc-\u{1F47B}\u{1F47B}\u{1F47B}"
Conversation
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
This comment has been minimized.
This comment has been minimized.
Some(ty::Visibility::Restricted(_)) => { | ||
"<span title=\"Restricted Visibility\"> 🔒</span> " | ||
if myitem.is_doc_hidden() { |
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.
Isn't the condition reversed here? Also, if the item is both hidden and private, should we show that it is private?
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.
oops. fixed. And yes, I think we should show both, though really hidden+private doesn't make sense.
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.
Then what's the use case of showing both?
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.
There's not a large use case, but it may make sense for crates that more regularly use --document-private-items
.
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.
Well, we can always change it afterwards if we change our minds about it.
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 meant it's fine to leave it as is)
Another question I have about unicode: the rendering of the emoji seems different between github and rustdoc output. Will it change depending on the font installed (ie, the web browser/OS)? If so we should maybe use an image instead. |
@GuillaumeGomez we already use emoji for private items and other things. rustdoc ships with its fonts, it should be fine. |
Ok, code changes look good to me. I have a few reservations about the display of Should we:
|
@GuillaumeGomez I think |
It's still bugging me to have the inlined attribute. Do you mind asking the rest of the team about it? If I'm the only one having an issue with this, let's merge it. |
Let's merge it then! @bors r+ rollup |
Maybe something like adding a Could you add screenshots of what the above modules currently look like, if you have them handy? Just to better see the difference |
…meGomez Visually mark 👻hidden👻 items with document-hidden-items Fixes rust-lang#122485 This adds a 👻 in the item list (much like the 🔒 used for private items), and also shows `#[doc(hidden)]` in the code view, where `pub(crate)` etc gets shown for private items. This does not do anything for enum variants, if people have ideas. I think we can just show the attribute.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#122254 (Detect calls to .clone() on T: !Clone types on borrowck errors) - rust-lang#122495 (Visually mark 👻hidden👻 items with document-hidden-items) - rust-lang#122543 (Add `#![rustc_never_type_mode = "..."]` crate-level attribute to allow experimenting) - rust-lang#122560 (Safe Transmute: Use 'not yet supported', not 'unspecified' in errors) - rust-lang#122562 (Mention labelled blocks in `break` docs) - rust-lang#122563 (CI: cache PR CI Docker builds) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122495 - Manishearth:rustdoc-👻👻👻, r=GuillaumeGomez Visually mark 👻hidden👻 items with document-hidden-items Fixes rust-lang#122485 This adds a 👻 in the item list (much like the 🔒 used for private items), and also shows `#[doc(hidden)]` in the code view, where `pub(crate)` etc gets shown for private items. This does not do anything for enum variants, if people have ideas. I think we can just show the attribute.
Fixes #122485
This adds a 👻 in the item list (much like the 🔒 used for private items), and also shows
#[doc(hidden)]
in the code view, wherepub(crate)
etc gets shown for private items.This does not do anything for enum variants, if people have ideas. I think we can just show the attribute.