summaryrefslogtreecommitdiffstats
path: root/src/test/ui/numbers-arithmetic/suggest-float-literal.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/numbers-arithmetic/suggest-float-literal.stderr')
-rw-r--r--src/test/ui/numbers-arithmetic/suggest-float-literal.stderr179
1 files changed, 179 insertions, 0 deletions
diff --git a/src/test/ui/numbers-arithmetic/suggest-float-literal.stderr b/src/test/ui/numbers-arithmetic/suggest-float-literal.stderr
new file mode 100644
index 000000000..988379e58
--- /dev/null
+++ b/src/test/ui/numbers-arithmetic/suggest-float-literal.stderr
@@ -0,0 +1,179 @@
+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>`:
+ <&'a f32 as Add<f32>>
+ <&'a f64 as Add<f64>>
+ <&'a i128 as Add<i128>>
+ <&'a i16 as Add<i16>>
+ <&'a i32 as Add<i32>>
+ <&'a i64 as Add<i64>>
+ <&'a i8 as Add<i8>>
+ <&'a isize as Add<isize>>
+ and 48 others
+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>`:
+ <&'a f32 as Add<f32>>
+ <&'a f64 as Add<f64>>
+ <&'a i128 as Add<i128>>
+ <&'a i16 as Add<i16>>
+ <&'a i32 as Add<i32>>
+ <&'a i64 as Add<i64>>
+ <&'a i8 as Add<i8>>
+ <&'a isize as Add<isize>>
+ and 48 others
+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>`:
+ <&'a f32 as Sub<f32>>
+ <&'a f64 as Sub<f64>>
+ <&'a i128 as Sub<i128>>
+ <&'a i16 as Sub<i16>>
+ <&'a i32 as Sub<i32>>
+ <&'a i64 as Sub<i64>>
+ <&'a i8 as Sub<i8>>
+ <&'a isize as Sub<isize>>
+ and 48 others
+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>`:
+ <&'a f32 as Sub<f32>>
+ <&'a f64 as Sub<f64>>
+ <&'a i128 as Sub<i128>>
+ <&'a i16 as Sub<i16>>
+ <&'a i32 as Sub<i32>>
+ <&'a i64 as Sub<i64>>
+ <&'a i8 as Sub<i8>>
+ <&'a isize as Sub<isize>>
+ and 48 others
+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>`:
+ <&'a f32 as Mul<f32>>
+ <&'a f64 as Mul<f64>>
+ <&'a i128 as Mul<i128>>
+ <&'a i16 as Mul<i16>>
+ <&'a i32 as Mul<i32>>
+ <&'a i64 as Mul<i64>>
+ <&'a i8 as Mul<i8>>
+ <&'a isize as Mul<isize>>
+ and 49 others
+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>`:
+ <&'a f32 as Mul<f32>>
+ <&'a f64 as Mul<f64>>
+ <&'a i128 as Mul<i128>>
+ <&'a i16 as Mul<i16>>
+ <&'a i32 as Mul<i32>>
+ <&'a i64 as Mul<i64>>
+ <&'a i8 as Mul<i8>>
+ <&'a isize as Mul<isize>>
+ and 49 others
+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>`:
+ <&'a f32 as Div<f32>>
+ <&'a f64 as Div<f64>>
+ <&'a i128 as Div<i128>>
+ <&'a i16 as Div<i16>>
+ <&'a i32 as Div<i32>>
+ <&'a i64 as Div<i64>>
+ <&'a i8 as Div<i8>>
+ <&'a isize as Div<isize>>
+ and 54 others
+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>`:
+ <&'a f32 as Div<f32>>
+ <&'a f64 as Div<f64>>
+ <&'a i128 as Div<i128>>
+ <&'a i16 as Div<i16>>
+ <&'a i32 as Div<i32>>
+ <&'a i64 as Div<i64>>
+ <&'a i8 as Div<i8>>
+ <&'a isize as Div<isize>>
+ and 54 others
+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`.