Skip to content

Multiple attributes are shown on the same line in type declarations in rustdoc #73205

Closed
@daboross

Description

@daboross

When looking at rustdoc for items with multiple attributes, atributes are shown on the same line, rather than multiple. I don't have a code fragment, as I've only seen this appear in std documentation.

For example, see the MaybeUninit docs: https://doc.rust-lang.org/1.44.0/std/mem/union.MaybeUninit.html and expand the declaration.

I expected to see something like

#[lang = "maybe_uninit"]
#[repr(transparent)]
pub union MaybeUninit<T> {
    // some fields omitted
}

Instead, I see:

#[lang = "maybe_uninit"]#[repr(transparent)]
pub union MaybeUninit<T> {
    // some fields omitted
}

image

This occurs for both rust 1.44.0 and current nightly (unsure of exact nightly version, as looking at std nightly docs, not local docs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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