Closed
Description
struct Foo {
a: i32,
b: i32,
}
fn main() {
let x = Foo {
a: 42,,
b: 3,
};
}
results in
error: expected identifier, found `,`
--> src/main.rs:9:15
|
8 | let x = Foo {
| --- while parsing this struct
9 | a: 42,,
| ^ expected identifier
error[E0063]: missing field `b` in initializer of `Foo`
--> src/main.rs:8:13
|
8 | let x = Foo {
| ^^^ missing `b`
we may want to add a parser recovery that just reports the error, eats the comma and continues parsing as normally