You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IIUC, Rustdoc collapses all trait impls and the type declaration (cc #49412) by default. But leaves other sections expanded.
This seems good in many cases, but in others. We might want to adjust exactly how things are collapsed.
Some thoughts:
When collapsing the type decl, it would be nice to still see a minimal part of the signature, e.g., for Iterator there is good reason to not show all the methods, but it would be nice to show pub trait Iterator { ... } and maybe the Item assoc type. I realise all the information is there on the page, but it just looks incomplete without something there.
It is often useful to have type decl as a 'contents' page for the docs, especially if the intro text is very long. OTOH, it might be nice to actually have a contents (e.g., just the names of fields/methods) so that impl methods are included.
For trait impls, it would be nice to include the signatures of methods, but not the text descriptions (i.e., the trait impl is expanded, but each method is collapsed). The reasoning here is that often wants to know the names or signatures of methods in an impl, but not the descriptions (where I agree with the reasoning that it is not the most useful).
For traits, it would be good to further collapse the list of impls, see for example IntoIterator, it might be nice to have just a list of the types (rather than the signatures) with a click through to see the sig, or to keep the current style but collapse the whole list by default.
The text was updated successfully, but these errors were encountered:
nrc
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Jul 19, 2018
The current way to fix those issues is generally to add a setting for each one. After that, the discussion is generally on: "should it be on or off by default?". Does it sound ok to you?
IIUC, Rustdoc collapses all trait impls and the type declaration (cc #49412) by default. But leaves other sections expanded.
This seems good in many cases, but in others. We might want to adjust exactly how things are collapsed.
Some thoughts:
pub trait Iterator { ... }
and maybe theItem
assoc type. I realise all the information is there on the page, but it just looks incomplete without something there.The text was updated successfully, but these errors were encountered: