summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/unnecessary_dot_for_floating_point_literal.stderr
blob: 34eaa8322c8701e70f451c34a510a4567055d18d (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
49
50
51
52
53
54
55
56
57
58
59
error[E0308]: mismatched types
  --> $DIR/unnecessary_dot_for_floating_point_literal.rs:2:18
   |
LL |     let _: f64 = 0..10;
   |            ---   ^^^^^ expected `f64`, found struct `Range`
   |            |
   |            expected due to this
   |
   = note: expected type `f64`
            found struct `std::ops::Range<{integer}>`
help: remove the unnecessary `.` operator for a floating point literal
   |
LL |     let _: f64 = 0.10;
   |                   ~

error[E0308]: mismatched types
  --> $DIR/unnecessary_dot_for_floating_point_literal.rs:3:18
   |
LL |     let _: f64 = 1..;
   |            ---   ^^^ expected `f64`, found struct `RangeFrom`
   |            |
   |            expected due to this
   |
   = note: expected type `f64`
            found struct `RangeFrom<{integer}>`
help: remove the unnecessary `.` operator for a floating point literal
   |
LL |     let _: f64 = 1.;
   |                   ~

error[E0308]: mismatched types
  --> $DIR/unnecessary_dot_for_floating_point_literal.rs:4:18
   |
LL |     let _: f64 = ..10;
   |            ---   ^^^^ expected `f64`, found struct `RangeTo`
   |            |
   |            expected due to this
   |
   = note: expected type `f64`
            found struct `RangeTo<{integer}>`
help: remove the unnecessary `.` operator and add an integer part for a floating point literal
   |
LL |     let _: f64 = 0.10;
   |                  ~~

error[E0308]: mismatched types
  --> $DIR/unnecessary_dot_for_floating_point_literal.rs:5:18
   |
LL |     let _: f64 = std::ops::Range { start: 0, end: 1 };
   |            ---   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `f64`, found struct `Range`
   |            |
   |            expected due to this
   |
   = note: expected type `f64`
            found struct `std::ops::Range<{integer}>`

error: aborting due to 4 previous errors

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