blob: a31ed61547465637c76b3cbb403b525575b80fd8 [file] [log] [blame] [edit]
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`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Add<f32>`
|
= note: `&f32` implements `Add`
|
= note: `f32` implements `Add<&f32>`
|
= note: `f32` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
help: the following other types implement trait `Add<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Add<f64>`
|
= note: `&f64` implements `Add`
|
= note: `f64` implements `Add<&f64>`
|
= note: `f64` implements `Add`
= note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Sub<f32>`
|
= note: `&f32` implements `Sub`
|
= note: `f32` implements `Sub<&f32>`
|
= note: `f32` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
help: the following other types implement trait `Sub<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Sub<f64>`
|
= note: `&f64` implements `Sub`
|
= note: `f64` implements `Sub<&f64>`
|
= note: `f64` implements `Sub`
= note: this error originates in the macro `sub_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Mul<f32>`
|
= note: `&f32` implements `Mul`
|
= note: `f32` implements `Mul<&f32>`
|
= note: `f32` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
help: the following other types implement trait `Mul<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Mul<f64>`
|
= note: `&f64` implements `Mul`
|
= note: `f64` implements `Mul<&f64>`
|
= note: `f64` implements `Mul`
= note: this error originates in the macro `mul_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
help: the following other types implement trait `Div<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f32` implements `Div<f32>`
|
= note: `&f32` implements `Div`
|
= note: `f32` implements `Div<&f32>`
|
= note: `f32` implements `Div`
= note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
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`
help: the following other types implement trait `Div<Rhs>`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
= note: `&f64` implements `Div<f64>`
|
= note: `&f64` implements `Div`
|
= note: `f64` implements `Div<&f64>`
|
= note: `f64` implements `Div`
= note: this error originates in the macro `div_impl_float` (in Nightly builds, run with -Z macro-backtrace for more info)
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`.