]> git.lizzy.rs Git - rust.git/blob - src/test/ui/float-literal-inference-restrictions.stderr
Rollup merge of #66587 - matthewjasper:handle-static-as-const, r=oli-obk
[rust.git] / src / test / ui / float-literal-inference-restrictions.stderr
1 error[E0308]: mismatched types
2   --> $DIR/float-literal-inference-restrictions.rs:2:18
3    |
4 LL |     let x: f32 = 1;
5    |                  ^
6    |                  |
7    |                  expected `f32`, found integer
8    |                  help: use a float literal: `1.0`
9
10 error[E0308]: mismatched types
11   --> $DIR/float-literal-inference-restrictions.rs:3:18
12    |
13 LL |     let y: f32 = 1f64;
14    |                  ^^^^ expected `f32`, found `f64`
15    |
16 help: change the type of the numeric literal from `f64` to `f32`
17    |
18 LL |     let y: f32 = 1f32;
19    |                  ^^^^
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0308`.