-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
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
.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.