Closed
Description
The following code passes with rustfmt --check
:
fn foo(a: T) {
match a {
1 => {}
0 => {}
// _ => panic!("doesn't format!"),
}
}
If you remove the comma afterpanic!("doesn't format!"),
, rustfmt --check
complains.
$ rustfmt --check src/fmt.rs
Diff in fmt.rs at line 1:
fn foo(a: T) {
match a {
-1 => {}
- 0 => {}
- // _ => panic!("doesn't format!")
+ 1 => {}
+ 0 => {} // _ => panic!("doesn't format!")
}
}