Skip to content

Misleading docs for an enum with struct variants #37500

Closed
@mathstuf

Description

@mathstuf

Given this structure:

pub enum OldTopicRemoval {
    Obsoleted {
        old_merge: StagedTopic,
        replacement: Option<StagedTopic>,
    },
    Removed(StagedTopic),
}

I'm seeing docs rendered as:

docs-enum

Which makes it look like Removed is more closely related to the fields of Obsoleted rather than on the same level. It'd be nice if the fields for the Obsoleted variant fields were either indented somehow or collapsed with the description.

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