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

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

Open
bbugh opened this issue Sep 11, 2023 · 0 comments

Comments

@bbugh
Copy link

bbugh commented Sep 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant