2019-01-20 15:59:35 -06:00
|
|
|
error: float literals must have an integer part
|
2019-01-20 02:37:06 -06:00
|
|
|
--> $DIR/issue-52496.rs:4:24
|
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar: .5, baz: 42 };
|
2019-01-20 15:59:35 -06:00
|
|
|
| ^^ help: must have an integer part: `0.5`
|
2019-01-20 02:37:06 -06:00
|
|
|
|
|
|
|
error: expected one of `,` or `}`, found `.`
|
2019-01-20 03:49:04 -06:00
|
|
|
--> $DIR/issue-52496.rs:9:22
|
2019-01-20 02:37:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar.into(), bat: -1, . };
|
|
|
|
| --- ^ expected one of `,` or `}` here
|
|
|
|
| |
|
|
|
|
| while parsing this struct
|
|
|
|
|
|
|
|
error: expected identifier, found `.`
|
2019-01-20 03:49:04 -06:00
|
|
|
--> $DIR/issue-52496.rs:9:40
|
2019-01-20 02:37:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar.into(), bat: -1, . };
|
|
|
|
| --- ^ expected identifier
|
|
|
|
| |
|
|
|
|
| while parsing this struct
|
|
|
|
|
2019-01-20 03:49:04 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/issue-52496.rs:4:24
|
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar: .5, baz: 42 };
|
|
|
|
| ^^ expected f64, found f32
|
|
|
|
help: change the type of the numeric literal from `f32` to `f64`
|
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar: .5f64, baz: 42 };
|
|
|
|
| ^^^^^
|
|
|
|
|
2019-01-20 02:37:06 -06:00
|
|
|
error[E0063]: missing field `bat` in initializer of `Foo`
|
|
|
|
--> $DIR/issue-52496.rs:4:13
|
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar: .5, baz: 42 };
|
|
|
|
| ^^^ missing `bat`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-01-20 03:49:04 -06:00
|
|
|
--> $DIR/issue-52496.rs:9:19
|
2019-01-20 02:37:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar.into(), bat: -1, . };
|
|
|
|
| ^^^ expected f64, found f32
|
|
|
|
help: you can cast an `f32` to `f64` in a lossless way
|
|
|
|
|
|
2019-01-20 03:49:04 -06:00
|
|
|
LL | let _ = Foo { bar.into().into(), bat: -1, . };
|
|
|
|
| ^^^^^^^^^^
|
2019-01-20 02:37:06 -06:00
|
|
|
|
|
|
|
error[E0063]: missing field `baz` in initializer of `Foo`
|
2019-01-20 03:49:04 -06:00
|
|
|
--> $DIR/issue-52496.rs:9:13
|
2019-01-20 02:37:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = Foo { bar.into(), bat: -1, . };
|
|
|
|
| ^^^ missing `baz`
|
|
|
|
|
2019-01-20 03:49:04 -06:00
|
|
|
error: aborting due to 7 previous errors
|
2019-01-20 02:37:06 -06:00
|
|
|
|
|
|
|
Some errors occurred: E0063, E0308.
|
|
|
|
For more information about an error, try `rustc --explain E0063`.
|