Skip to content

rustdoc: Named fields should have their types displayed next to their descriptions #32024

Closed
@crumblingstatue

Description

@crumblingstatue

Right now, the types of (struct / enum variant) fields are only displayed in the "code box" at the top:

But the "code box" is not the usual place to go for documentation, as it is lacking the descriptions written by the author.

The actual descriptions are located further down. How much further depends on how many fields the struct/enum contains, but can be far enough that the "code box" is not visible anymore, so you can't see the types of the fields.

This is inconvenient. One does not want to jump back and forth between the "code box" and the descriptions to be able to know both the type and purpose of the field.

Furthermore, direct links to struct enum variants drop you off at the description site, so you only get the description, and have to scroll up if you also want to get the type information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions