-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Multiple doc issues with "Important Traits" feature #46352
Comments
More: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#impl-Index%3Cusize%3E
|
Working on it. |
…Misdreavus Invert colors in important traits tooltip Part of rust-lang#46352. r? @QuietMisdreavus
…Misdreavus Invert colors in important traits tooltip Part of rust-lang#46352. r? @QuietMisdreavus
Merged so I suppose it can be closed now. Don't hesitate to tell if I forgot something. |
I could not find the source of this feature, so I'll write here.
Chrome 64, Windows 7/10. |
First example: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.with_capacity
On the tool-tip the dark red and cyan text on a black background are very hard to read, and the use of very bold white text on a solid black background looks out of place in the documentation.
The traits shown are not important. Every function which returns a
Vec
will now have an information icon explaining thatVec<u8>
implementsWrite
.It's strange that the "information" icon on a function is related specifically to the return type of that function.
Second example: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.into_boxed_slice
The tool-tip will arbitrarily pick the first type to display in the event that there are multiple possibilities. (In this case it picks
Box<I>
where the type parameterI
means nothing at that point)The modal dialog needs more spacing and probably a border.
Increases the inconsistency in style of the documentation. The docs used to be so simple that they did seem to have a consistent style throughout. Now rustdoc has a lot more features, and the mishmash of different styles is becoming an issue. Adding a whole new model dialog component doesn't help.
Some suggestions for improvements:
Overall, I don't think that putting this information in a modal is the best option. Personally I think it would make more send to just add a "Return value" section, and put the information in there. It will make the documentation for those functions more verbose, but it will reduce the complexity of the documentation as a whole, and keep everything consistent.
The text was updated successfully, but these errors were encountered: