Closed
Description
enum Foo {
Bar,
Baz,
}
fn main() {
let myfoo = Foo::Bar;
match myfoo {
Foo::Bar => {}
Foo:Baz => {} // OOPS: I forgot a colon here
}
}
On the playground (rustc 1.53), here's what I see:
error: expected one of `=>`, `@`, `if`, or `|`, found `:`
--> src/main.rs:10:12
|
10 | Foo:Baz => {}
| ^ expected one of `=>`, `@`, `if`, or `|`
It would be nice if rustc could say "hey it looks like you forgot a colon" here, similar to this case.