rust/src/test/ui/struct-field-init-syntax.stderr
Badel2 72cfd20941 Add error for comma after base struct field
`let x = { ..default(), } // This comma is an error`
2017-10-11 03:13:25 +02:00

18 lines
534 B
Text

error: cannot use a comma after the base struct
--> $DIR/struct-field-init-syntax.rs:18:9
|
18 | ..Foo::default(),
| ^^^^^^^^^^^^^^^^- help: remove this comma
|
= note: the base struct must always be the last field
error: cannot use a comma after the base struct
--> $DIR/struct-field-init-syntax.rs:23:9
|
23 | ..Foo::default(),
| ^^^^^^^^^^^^^^^^- help: remove this comma
|
= note: the base struct must always be the last field
error: aborting due to 2 previous errors