2019-01-20 02:37:06 -06:00
|
|
|
struct Foo { bar: f64, baz: i64, bat: i64 }
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = Foo { bar: .5, baz: 42 };
|
2019-01-20 15:59:35 -06:00
|
|
|
//~^ ERROR float literals must have an integer part
|
2019-01-20 02:37:06 -06:00
|
|
|
//~| ERROR missing field `bat` in initializer of `Foo`
|
|
|
|
let bar = 1.5f32;
|
|
|
|
let _ = Foo { bar.into(), bat: -1, . };
|
|
|
|
//~^ ERROR expected one of
|
2021-02-20 11:32:02 -06:00
|
|
|
//~| ERROR missing fields `bar` and `baz` in initializer of `Foo`
|
2019-01-20 02:37:06 -06:00
|
|
|
//~| ERROR expected identifier, found `.`
|
|
|
|
}
|