rustdoc: Mark public items, instead of private items, with --document-private-items
#95657
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Looking at the rustc API docs (doc.rust-lang.org/nightly/nightly-rustc), the result of #95024 still feels really noisy to me.
I have two ideas for ways to improve it:
Move the lock to the left "gutter", i.e. the left side of the name, but in a column to the left of all the names. This would make it look a bit less chaotic. Not sure how technically feasible this is, and it'd still have noise from the locks themselves.
Instead of marking private items, mark public items. This would only happen when
--document-private-items
is passed. Usually crates have a lot more private items than public ones – which is even more likely for the kinds of crates that people use--document-private-items
on – in which case the markings would cause less noise.Also, my understanding is the original purpose of this PR was to make it easier to see which parts of the API are public. When all but a few items are marked, it's hard to find the unmarked items, whereas when just a few are marked, it's easier to find those marked items. So I think doing this would accomplish the goal even better.
The only issue I can think of is figuring out what icon to use. IntelliJ seems to use an open lock: https://stackoverflow.com/questions/57427175/intellij-not-showing-private-or-public-icon-aka-visibility-icon-for-methods-aka
I think I'd prefer option 2. What do you think about it?
Originally posted by @camelid in #95024 (comment)
The text was updated successfully, but these errors were encountered: