Description
Input
fn main() {
match 1 {
_ => {},
// hello!
}
}
Output
fn main() {
match 1 {
_ => {}
// hello!
}
}
Expected output
fn main() {
match 1 {
_ => {} // hello!
}
}
You get the expected output if you run it a second time. This means that the formatter needs multiple runs to fully finish formatting the code. That does not seem right. I want to be able to trust the formatter in that it will do it all in one run so that I never get into the habit of running it twice each time just to be 100% sure. Therefore I report this as a bug.
Meta
- rustfmt version: rustfmt 1.4.30-stable (8c6769d 2021-01-18)
- From where did you install rustfmt?: rustup