Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
daboross opened this issue Jun 10, 2020 · 0 comments · Fixed by #73852
Closed

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

daboross opened this issue Jun 10, 2020 · 0 comments · Fixed by #73852
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@daboross
Copy link
Contributor

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).

@daboross daboross added the C-bug Category: This is a bug. label Jun 10, 2020
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 10, 2020
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 13, 2020
…llaumeGomez

rustdoc: insert newlines between attributes

Fixes rust-lang#73205.
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 13, 2020
…llaumeGomez

rustdoc: insert newlines between attributes

Fixes rust-lang#73205.
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 13, 2020
…llaumeGomez

rustdoc: insert newlines between attributes

Fixes rust-lang#73205.
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 13, 2020
…llaumeGomez

rustdoc: insert newlines between attributes

Fixes rust-lang#73205.
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 14, 2020
…llaumeGomez

rustdoc: insert newlines between attributes

Fixes rust-lang#73205.
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 14, 2020
…llaumeGomez

rustdoc: insert newlines between attributes

Fixes rust-lang#73205.
@bors bors closed this as completed in eb7fdb2 Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants