summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/bad-hex-float-lit.stderr
blob: bc09abb1a5671732978059f89b91e7fdf2c93d03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
error[E0308]: mismatched types
  --> $DIR/bad-hex-float-lit.rs:2:19
   |
LL |     let _f: f32 = 0xAAf32;
   |             ---   ^^^^^^^ expected `f32`, found integer
   |             |
   |             expected due to this
   |
help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
   |
LL |     let _f: f32 = 0xAA as f32;
   |                   ~~~~~~~~~~~
LL |     let _f: f32 = 170_f32;
   |                   ~~~~~~~

error[E0308]: mismatched types
  --> $DIR/bad-hex-float-lit.rs:6:19
   |
LL |     let _f: f32 = 0xAB_f32;
   |             ---   ^^^^^^^^ expected `f32`, found integer
   |             |
   |             expected due to this
   |
help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
   |
LL |     let _f: f32 = 0xAB as f32;
   |                   ~~~~~~~~~~~
LL |     let _f: f32 = 171_f32;
   |                   ~~~~~~~

error[E0308]: mismatched types
  --> $DIR/bad-hex-float-lit.rs:10:19
   |
LL |     let _f: f64 = 0xFF_f64;
   |             ---   ^^^^^^^^ expected `f64`, found integer
   |             |
   |             expected due to this
   |
help: rewrite this as a decimal floating point literal, or use `as` to turn a hex literal into a float
   |
LL |     let _f: f64 = 0xFF as f64;
   |                   ~~~~~~~~~~~
LL |     let _f: f64 = 255_f64;
   |                   ~~~~~~~

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.