- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
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
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
scottmcm
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.