|
| 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 `std::ops::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 to to use a floating point literal |
| 12 | + | |
| 13 | +LL - let _: f64 = 0..10; |
| 14 | +LL + let _: f64 = 0.10; |
| 15 | + | |
| 16 | + |
| 17 | +error[E0308]: mismatched types |
| 18 | + --> $DIR/unnecessary_dot_for_floating_point_literal.rs:3:18 |
| 19 | + | |
| 20 | +LL | let _: f64 = 0..; |
| 21 | + | --- ^^^ expected `f64`, found struct `RangeFrom` |
| 22 | + | | |
| 23 | + | expected due to this |
| 24 | + | |
| 25 | + = note: expected type `f64` |
| 26 | + found struct `RangeFrom<{integer}>` |
| 27 | + |
| 28 | +error[E0308]: mismatched types |
| 29 | + --> $DIR/unnecessary_dot_for_floating_point_literal.rs:4:18 |
| 30 | + | |
| 31 | +LL | let _: f64 = ..10; |
| 32 | + | --- ^^^^ expected `f64`, found struct `RangeTo` |
| 33 | + | | |
| 34 | + | expected due to this |
| 35 | + | |
| 36 | + = note: expected type `f64` |
| 37 | + found struct `RangeTo<{integer}>` |
| 38 | + |
| 39 | +error[E0308]: mismatched types |
| 40 | + --> $DIR/unnecessary_dot_for_floating_point_literal.rs:5:18 |
| 41 | + | |
| 42 | +LL | let _: f64 = std::ops::Range { start: 0, end: 1 }; |
| 43 | + | --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `f64`, found struct `std::ops::Range` |
| 44 | + | | |
| 45 | + | expected due to this |
| 46 | + | |
| 47 | + = note: expected type `f64` |
| 48 | + found struct `std::ops::Range<{integer}>` |
| 49 | + |
| 50 | +error: aborting due to 4 previous errors |
| 51 | + |
| 52 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments