]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/unnecessary_dot_for_floating_point_literal.stderr
Rollup merge of #106751 - clubby789:const-intrinsic, r=GuillaumeGomez
[rust.git] / tests / ui / suggestions / unnecessary_dot_for_floating_point_literal.stderr
1 error[E0308]: mismatched types
2   --> $DIR/unnecessary_dot_for_floating_point_literal.rs:2:18
3    |
4 LL |     let _: f64 = 0..10;
5    |            ---   ^^^^^ expected `f64`, found struct `Range`
6    |            |
7    |            expected due to this
8    |
9    = note: expected type `f64`
10             found struct `std::ops::Range<{integer}>`
11 help: remove the unnecessary `.` operator for a floating point literal
12    |
13 LL |     let _: f64 = 0.10;
14    |                   ~
15
16 error[E0308]: mismatched types
17   --> $DIR/unnecessary_dot_for_floating_point_literal.rs:3:18
18    |
19 LL |     let _: f64 = 1..;
20    |            ---   ^^^ expected `f64`, found struct `RangeFrom`
21    |            |
22    |            expected due to this
23    |
24    = note: expected type `f64`
25             found struct `RangeFrom<{integer}>`
26 help: remove the unnecessary `.` operator for a floating point literal
27    |
28 LL |     let _: f64 = 1.;
29    |                   ~
30
31 error[E0308]: mismatched types
32   --> $DIR/unnecessary_dot_for_floating_point_literal.rs:4:18
33    |
34 LL |     let _: f64 = ..10;
35    |            ---   ^^^^ expected `f64`, found struct `RangeTo`
36    |            |
37    |            expected due to this
38    |
39    = note: expected type `f64`
40             found struct `RangeTo<{integer}>`
41 help: remove the unnecessary `.` operator and add an integer part for a floating point literal
42    |
43 LL |     let _: f64 = 0.10;
44    |                  ~~
45
46 error[E0308]: mismatched types
47   --> $DIR/unnecessary_dot_for_floating_point_literal.rs:5:18
48    |
49 LL |     let _: f64 = std::ops::Range { start: 0, end: 1 };
50    |            ---   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `f64`, found struct `Range`
51    |            |
52    |            expected due to this
53    |
54    = note: expected type `f64`
55             found struct `std::ops::Range<{integer}>`
56
57 error: aborting due to 4 previous errors
58
59 For more information about this error, try `rustc --explain E0308`.