]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/bad-hex-float-lit.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / bad-hex-float-lit.stderr
1 error[E0308]: mismatched types
2   --> $DIR/bad-hex-float-lit.rs:2:19
3    |
4 LL |     let _f: f32 = 0xAAf32;
5    |             ---   ^^^^^^^ expected `f32`, found integer
6    |             |
7    |             expected due to this
8    |
9 help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
10    |
11 LL |     let _f: f32 = 0xAA as f32;
12    |                   ~~~~~~~~~~~
13 LL |     let _f: f32 = 170_f32;
14    |                   ~~~~~~~
15
16 error[E0308]: mismatched types
17   --> $DIR/bad-hex-float-lit.rs:6:19
18    |
19 LL |     let _f: f32 = 0xAB_f32;
20    |             ---   ^^^^^^^^ expected `f32`, found integer
21    |             |
22    |             expected due to this
23    |
24 help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
25    |
26 LL |     let _f: f32 = 0xAB as f32;
27    |                   ~~~~~~~~~~~
28 LL |     let _f: f32 = 171_f32;
29    |                   ~~~~~~~
30
31 error[E0308]: mismatched types
32   --> $DIR/bad-hex-float-lit.rs:10:19
33    |
34 LL |     let _f: f64 = 0xFF_f64;
35    |             ---   ^^^^^^^^ expected `f64`, found integer
36    |             |
37    |             expected due to this
38    |
39 help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
40    |
41 LL |     let _f: f64 = 0xFF as f64;
42    |                   ~~~~~~~~~~~
43 LL |     let _f: f64 = 255_f64;
44    |                   ~~~~~~~
45
46 error: aborting due to 3 previous errors
47
48 For more information about this error, try `rustc --explain E0308`.