]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-24352.stderr
Rollup merge of #95483 - golddranks:improve_float_docs, r=joshtriplett
[rust.git] / src / test / ui / issues / issue-24352.stderr
1 error[E0277]: cannot subtract `{integer}` from `f64`
2   --> $DIR/issue-24352.rs:3:12
3    |
4 LL |     1.0f64 - 1
5    |            ^ no implementation for `f64 - {integer}`
6    |
7    = help: the trait `Sub<{integer}>` is not implemented for `f64`
8    = help: the following other types implement trait `Sub<Rhs>`:
9              <&'a f32 as Sub<f32>>
10              <&'a f64 as Sub<f64>>
11              <&'a i128 as Sub<i128>>
12              <&'a i16 as Sub<i16>>
13              <&'a i32 as Sub<i32>>
14              <&'a i64 as Sub<i64>>
15              <&'a i8 as Sub<i8>>
16              <&'a isize as Sub<isize>>
17            and 48 others
18 help: consider using a floating-point literal by writing it with `.0`
19    |
20 LL |     1.0f64 - 1.0
21    |               ++
22
23 error: aborting due to previous error
24
25 For more information about this error, try `rustc --explain E0277`.