Skip to content

Double Space between pub and type in newtype when an attribute is followed by a comment #5997

Open

Description

This looks related to #4671 but the attribute is not very long at all.

This formats with two spaces:

pub struct Newtype(
    /// Doc
    #[doc()] //
    pub  Vec<u8>,
);

This formats with one:

pub struct Newtype(
    /// Doc
    #[doc()]
    pub Vec<u8>,
);

Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6abf771bd72b8a98d38368badd4916de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions