rust/src/test/ui/structs/struct-field-init-syntax.rs

18 lines
327 B
Rust
Raw Normal View History

// compile-flags: -Z parse-only
// issue #41834
fn main() {
let foo = Foo {
one: 111,
..Foo::default(),
2017-11-20 06:13:27 -06:00
//~^ ERROR cannot use a comma after the base struct
};
let foo = Foo {
..Foo::default(),
2017-11-20 06:13:27 -06:00
//~^ ERROR cannot use a comma after the base struct
one: 111,
};
}