2022-02-17 10:33:32 +00:00
|
|
|
error[E0277]: cannot add `{integer}` to `f32`
|
|
|
|
--> $DIR/suggest-float-literal.rs:6:7
|
|
|
|
|
|
|
|
|
LL | x + 100
|
|
|
|
| ^ no implementation for `f32 + {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Add<{integer}>` is not implemented for `f32`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Add<Rhs>`:
|
2021-12-13 20:56:40 +00:00
|
|
|
<&'a f32 as Add<f32>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f32 as Add<&f32>>
|
|
|
|
<f32 as Add<&f32>>
|
|
|
|
<f32 as Add>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x + 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error[E0277]: cannot add `{integer}` to `f64`
|
|
|
|
--> $DIR/suggest-float-literal.rs:10:7
|
|
|
|
|
|
|
|
|
LL | x + 100
|
|
|
|
| ^ no implementation for `f64 + {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Add<{integer}>` is not implemented for `f64`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Add<Rhs>`:
|
2022-03-27 01:49:01 +00:00
|
|
|
<&'a f64 as Add<f64>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f64 as Add<&f64>>
|
|
|
|
<f64 as Add<&f64>>
|
|
|
|
<f64 as Add>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x + 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error[E0277]: cannot subtract `{integer}` from `f32`
|
|
|
|
--> $DIR/suggest-float-literal.rs:14:7
|
|
|
|
|
|
|
|
|
LL | x - 100
|
|
|
|
| ^ no implementation for `f32 - {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Sub<{integer}>` is not implemented for `f32`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Sub<Rhs>`:
|
2021-12-13 20:56:40 +00:00
|
|
|
<&'a f32 as Sub<f32>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f32 as Sub<&f32>>
|
|
|
|
<f32 as Sub<&f32>>
|
|
|
|
<f32 as Sub>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x - 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error[E0277]: cannot subtract `{integer}` from `f64`
|
|
|
|
--> $DIR/suggest-float-literal.rs:18:7
|
|
|
|
|
|
|
|
|
LL | x - 100
|
|
|
|
| ^ no implementation for `f64 - {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Sub<Rhs>`:
|
2022-03-27 01:49:01 +00:00
|
|
|
<&'a f64 as Sub<f64>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f64 as Sub<&f64>>
|
|
|
|
<f64 as Sub<&f64>>
|
|
|
|
<f64 as Sub>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x - 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error[E0277]: cannot multiply `f32` by `{integer}`
|
|
|
|
--> $DIR/suggest-float-literal.rs:22:7
|
|
|
|
|
|
|
|
|
LL | x * 100
|
|
|
|
| ^ no implementation for `f32 * {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Mul<{integer}>` is not implemented for `f32`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Mul<Rhs>`:
|
2021-12-13 20:56:40 +00:00
|
|
|
<&'a f32 as Mul<f32>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f32 as Mul<&f32>>
|
|
|
|
<f32 as Mul<&f32>>
|
|
|
|
<f32 as Mul>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x * 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error[E0277]: cannot multiply `f64` by `{integer}`
|
|
|
|
--> $DIR/suggest-float-literal.rs:26:7
|
|
|
|
|
|
|
|
|
LL | x * 100
|
|
|
|
| ^ no implementation for `f64 * {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Mul<{integer}>` is not implemented for `f64`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Mul<Rhs>`:
|
2022-03-27 01:49:01 +00:00
|
|
|
<&'a f64 as Mul<f64>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f64 as Mul<&f64>>
|
|
|
|
<f64 as Mul<&f64>>
|
|
|
|
<f64 as Mul>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x * 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error[E0277]: cannot divide `f32` by `{integer}`
|
|
|
|
--> $DIR/suggest-float-literal.rs:30:7
|
|
|
|
|
|
|
|
|
LL | x / 100
|
|
|
|
| ^ no implementation for `f32 / {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Div<{integer}>` is not implemented for `f32`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Div<Rhs>`:
|
2021-12-13 20:56:40 +00:00
|
|
|
<&'a f32 as Div<f32>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f32 as Div<&f32>>
|
|
|
|
<f32 as Div<&f32>>
|
|
|
|
<f32 as Div>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x / 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error[E0277]: cannot divide `f64` by `{integer}`
|
|
|
|
--> $DIR/suggest-float-literal.rs:34:7
|
|
|
|
|
|
|
|
|
LL | x / 100
|
|
|
|
| ^ no implementation for `f64 / {integer}`
|
|
|
|
|
|
|
|
|
= help: the trait `Div<{integer}>` is not implemented for `f64`
|
2022-03-27 02:02:07 +00:00
|
|
|
= help: the following other types implement trait `Div<Rhs>`:
|
2022-03-27 01:49:01 +00:00
|
|
|
<&'a f64 as Div<f64>>
|
2022-12-05 22:24:48 +00:00
|
|
|
<&f64 as Div<&f64>>
|
|
|
|
<f64 as Div<&f64>>
|
|
|
|
<f64 as Div>
|
2022-02-17 10:33:32 +00:00
|
|
|
help: consider using a floating-point literal by writing it with `.0`
|
|
|
|
|
|
|
|
|
LL | x / 100.0
|
|
|
|
| ++
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|