-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Description
For traits like Iterator
or Future
, it's essential to know what is their associated type. However, lists of trait implementations can be folded into a summary, and the summary hides the associated type.
The detailed list of trait implementations for a type can be quite long, so it's easier to scan it with all items folded into summaries (using top-right summary button). That makes the trait implementations also less informative:
impl Iterator for Foo
type Item = Bar
I think the summaries could be made more useful by including the associated type in the summary somehow:
impl Iterator for Foo // Item = Bar
and the redundant annotation can be hidden when the details are expanded, with a bit of CSS trickery:
<style>
details[open] > summary span {
display: none;
}
</style>
<details>
<summary>impl Iterator for Foo <span>// Item = Bar</span></summary>
type Item = Bar
</details>
Metadata
Metadata
Assignees
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.