Open
Description
Related to #6060 and #6044. For the below snippet, rustfmt does nothing at all:
enum Foo {
A,
B,
C,
D,
}
fn main() {
let foo = Foo::A;
match foo {
// Here is a comment
Foo::A |
// And another one
Foo::B |
// Hey look! There's another one
Foo::C |
// That's a lot of comments
Foo::D => {}
}
}
If someone more knowledgeable about rustfmt internals can please confirm that this is a solvable bug, I'd be happy to contribute the fix.