Description
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)