]> git.lizzy.rs Git - rust.git/blob - src/test/ui/structs/struct-field-init-syntax.rs
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / structs / struct-field-init-syntax.rs
1 // issue #41834
2
3 #[derive(Default)]
4 struct Foo {
5     one: u8,
6 }
7
8 fn main() {
9     let foo = Foo {
10         one: 111,
11         ..Foo::default(),
12         //~^ ERROR cannot use a comma after the base struct
13     };
14
15     let foo = Foo {
16         ..Foo::default(),
17         //~^ ERROR cannot use a comma after the base struct
18         one: 111,
19     };
20 }