]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/float-literal-inference-restrictions.rs:2:18 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | let x: f32 = 1; |
b7449926 XL |
5 | | ^ |
6 | | | | |
0731742a | 7 | | expected f32, found integer |
b7449926 XL |
8 | | help: use a float literal: `1.0` |
9 | | | |
10 | = note: expected type `f32` | |
11 | found type `{integer}` | |
12 | ||
13 | error[E0308]: mismatched types | |
0731742a | 14 | --> $DIR/float-literal-inference-restrictions.rs:3:18 |
b7449926 | 15 | | |
532ac7d7 | 16 | LL | let y: f32 = 1f64; |
b7449926 | 17 | | ^^^^ expected f32, found f64 |
e74abb32 | 18 | | |
48663c56 XL |
19 | help: change the type of the numeric literal from `f64` to `f32` |
20 | | | |
21 | LL | let y: f32 = 1f32; | |
22 | | ^^^^ | |
b7449926 XL |
23 | |
24 | error: aborting due to 2 previous errors | |
25 | ||
26 | For more information about this error, try `rustc --explain E0308`. |