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

Match branch with comma and comment not formatted #4917

Closed
aDotInTheVoid opened this issue Jul 22, 2021 · 2 comments
Closed

Match branch with comma and comment not formatted #4917

aDotInTheVoid opened this issue Jul 22, 2021 · 2 comments
Labels
a-comments a-matches match arms, patterns, blocks, etc duplicate

Comments

@aDotInTheVoid
Copy link
Member

fn execute_instruction(instruction: Instruction) {
    match instruction {
                 RotateAccRight => {}
,
            // RLA
            RotateAccLeftThroughCarry => {}
    }
}

Rustfmt doesnt format this: playground

Interestinly: if you remove the , or // RLA, it does format the code

@gardrek
Copy link

gardrek commented Jul 22, 2021

To add to this, it seems it's not just the single branch, but the whole match statement that doesn't get formatted.

@calebcartwright
Copy link
Member

Believe this is likely a dupe of #4119 but will leave open for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-comments a-matches match arms, patterns, blocks, etc duplicate
Projects
None yet
Development

No branches or pull requests

3 participants