Skip to content

attributes are inconsistently and incorrectly combined into the same line on enums with struct or function variants #32

@bbugh

Description

@bbugh

Input code

#[derive(Error, Debug)]
enum Message {
    #[error("married order hunt twenty group lack known")]
    Quit,

    #[error("square sit center whether important")]
    Move { x: i32, y: i32 },

    #[error("thread wave since space sit own congress")]
    Write(String),

    #[error("tower blew high angry lovely everything")]
    ChangeColor(i32, i32, i32),
}

Output code

#[derive(Error, Debug)]
enum Message {
    #[error("married order hunt twenty group lack known")]
    Quit,

    #[error("square sit center whether important")] Move {
        x: i32,
        y: i32,
    },

    #[error("thread wave since space sit own congress")] Write(String),

    #[error("tower blew high angry lovely everything")] ChangeColor(i32, i32, i32),
}

Additional context

The formatting of this block should not change, as attributes should not be combined into the same line as the enum variant definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions