rustfmt
rustfmt copied to clipboard
Spurious semicolon inside closure is not idempotent
Consider the following snippet.
fn foo() -> fn(i32) -> i32 {
|a| {
;
a
}
}
Rustfmt starts by removing that spurious semicolon.
fn foo() -> fn(i32) -> i32 {
|a| {
a
}
}
If run again, it notices that the closure fits on one line.
fn foo() -> fn(i32) -> i32 {
|a| a
}
@rustbot claim