]>
Commit | Line | Data |
---|---|---|
1 | struct Foo { bar: f64, baz: i64, bat: i64 } | |
2 | ||
3 | fn main() { | |
4 | let _ = Foo { bar: .5, baz: 42 }; | |
5 | //~^ ERROR float literals must have an integer part | |
6 | //~| ERROR missing field `bat` in initializer of `Foo` | |
7 | let bar = 1.5f32; | |
8 | let _ = Foo { bar.into(), bat: -1, . }; | |
9 | //~^ ERROR expected one of | |
10 | //~| ERROR missing fields `bar` and `baz` in initializer of `Foo` | |
11 | //~| ERROR expected identifier, found `.` | |
12 | } |