rust/tests/ui/structs/multi-line-fru-suggestion.rs
2023-01-11 09:32:08 +00:00

23 lines
334 B
Rust

#[derive(Default)]
struct Inner {
a: u8,
b: u8,
}
#[derive(Default)]
struct Outer {
inner: Inner,
defaulted: u8,
}
fn main(){
Outer {
//~^ ERROR missing field `defaulted` in initializer of `Outer`
inner: Inner {
a: 1,
b: 2,
}
..Default::default()
};
}