1 // Check that `base` in `Fru { field: expr, ..base }` must have right type.
3 // See also struct-base-wrong-type.rs, which tests same condition
4 // within a const expression.
6 struct Foo { a: isize, b: isize }
7 struct Bar { x: isize }
11 let f = Foo { a: 2, ..b }; //~ ERROR mismatched types
12 //~| expected type `Foo`
14 //~| expected struct `Foo`, found struct `Bar`
15 let f__isize = Foo { a: 2, ..4 }; //~ ERROR mismatched types
16 //~| expected type `Foo`
17 //~| found type `{integer}`
18 //~| expected struct `Foo`, found integer