Closed
Description
Consider the following (incorrect) code.
enum E { A,B,C }
fn x(e:E) -> i32 {
match e {
A,B => 1,
C => 2
}
}
The comma in the match is obviously supposed to be a |
. However, rustc recommends I rewrite to (A,B)
, which makes the situation worse, as the compile error becomes expected enum E, found tuple
.