]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-53280-expected-float-found-integer-literal.stderr
Auto merge of #57925 - fintelia:riscv-cas, r=nagisa
[rust.git] / src / test / ui / did_you_mean / issue-53280-expected-float-found-integer-literal.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:2:24
3    |
4 LL |     let sixteen: f32 = 16;
5    |                        ^^
6    |                        |
7    |                        expected f32, found integer
8    |                        help: use a float literal: `16.0`
9    |
10    = note: expected type `f32`
11               found type `{integer}`
12
13 error[E0308]: mismatched types
14   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:5:38
15    |
16 LL |     let a_million_and_seventy: f64 = 1_000_070;
17    |                                      ^^^^^^^^^
18    |                                      |
19    |                                      expected f64, found integer
20    |                                      help: use a float literal: `1_000_070.0`
21    |
22    = note: expected type `f64`
23               found type `{integer}`
24
25 error[E0308]: mismatched types
26   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:8:30
27    |
28 LL |     let negative_nine: f32 = -9;
29    |                              ^^
30    |                              |
31    |                              expected f32, found integer
32    |                              help: use a float literal: `-9.0`
33    |
34    = note: expected type `f32`
35               found type `{integer}`
36
37 error[E0308]: mismatched types
38   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:15:30
39    |
40 LL |     let sixteen_again: f64 = 0x10;
41    |                              ^^^^ expected f64, found integer
42    |
43    = note: expected type `f64`
44               found type `{integer}`
45
46 error[E0308]: mismatched types
47   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:17:30
48    |
49 LL |     let and_once_more: f32 = 0o20;
50    |                              ^^^^ expected f32, found integer
51    |
52    = note: expected type `f32`
53               found type `{integer}`
54
55 error: aborting due to 5 previous errors
56
57 For more information about this error, try `rustc --explain E0308`.