diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/numbers-arithmetic/suggest-float-literal.stderr | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/numbers-arithmetic/suggest-float-literal.stderr')
-rw-r--r-- | tests/ui/numbers-arithmetic/suggest-float-literal.stderr | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.stderr b/tests/ui/numbers-arithmetic/suggest-float-literal.stderr new file mode 100644 index 000000000..03779d356 --- /dev/null +++ b/tests/ui/numbers-arithmetic/suggest-float-literal.stderr @@ -0,0 +1,139 @@ +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>> + <&f32 as Add<&f32>> + <f32 as Add<&f32>> + <f32 as Add> +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 f64 as Add<f64>> + <&f64 as Add<&f64>> + <f64 as Add<&f64>> + <f64 as Add> +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>> + <&f32 as Sub<&f32>> + <f32 as Sub<&f32>> + <f32 as Sub> +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 f64 as Sub<f64>> + <&f64 as Sub<&f64>> + <f64 as Sub<&f64>> + <f64 as Sub> +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>> + <&f32 as Mul<&f32>> + <f32 as Mul<&f32>> + <f32 as Mul> +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 f64 as Mul<f64>> + <&f64 as Mul<&f64>> + <f64 as Mul<&f64>> + <f64 as Mul> +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>> + <&f32 as Div<&f32>> + <f32 as Div<&f32>> + <f32 as Div> +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 f64 as Div<f64>> + <&f64 as Div<&f64>> + <f64 as Div<&f64>> + <f64 as Div> +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`. |