-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Multiple doc issues with "Important Traits" feature #46352
Copy link
Copy link
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
Vecwill 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 parameterImeans 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.