]> git.lizzy.rs Git - rust.git/blob - src/test/ui/float-literal-inference-restrictions.stderr
Rollup merge of #53344 - frewsxcv:frewsxcv-doc-ptr, r=ollie27
[rust.git] / src / test / ui / float-literal-inference-restrictions.stderr
1 error[E0308]: mismatched types
2   --> $DIR/float-literal-inference-restrictions.rs:12:18
3    |
4 LL |     let x: f32 = 1; //~ ERROR mismatched types
5    |                  ^
6    |                  |
7    |                  expected f32, found integral variable
8    |                  help: use a float literal: `1.0`
9    |
10    = note: expected type `f32`
11               found type `{integer}`
12
13 error[E0308]: mismatched types
14   --> $DIR/float-literal-inference-restrictions.rs:13:18
15    |
16 LL |     let y: f32 = 1f64; //~ ERROR mismatched types
17    |                  ^^^^ expected f32, found f64
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0308`.