about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic
diff options
context:
space:
mode:
authorAlex Macleod <alex@macleod.io>2024-06-07 14:54:42 +0000
committerAlex Macleod <alex@macleod.io>2024-06-12 12:34:47 +0000
commitd0112c68498470fe2945956b7ed24c5053cbf182 (patch)
tree3bc761dce6745fa2ca40f7759b7c712036636702 /tests/ui/numbers-arithmetic
parent02c7a5921e3de5c2b3ecb2e0082c1dafce0729a1 (diff)
downloadrust-d0112c68498470fe2945956b7ed24c5053cbf182.tar.gz
rust-d0112c68498470fe2945956b7ed24c5053cbf182.zip
Spell out other trait diagnostic
Diffstat (limited to 'tests/ui/numbers-arithmetic')
-rw-r--r--tests/ui/numbers-arithmetic/not-suggest-float-literal.stderr98
-rw-r--r--tests/ui/numbers-arithmetic/suggest-float-literal.stderr64
2 files changed, 81 insertions, 81 deletions
diff --git a/tests/ui/numbers-arithmetic/not-suggest-float-literal.stderr b/tests/ui/numbers-arithmetic/not-suggest-float-literal.stderr
index 14685a3f937..a910666bd56 100644
--- a/tests/ui/numbers-arithmetic/not-suggest-float-literal.stderr
+++ b/tests/ui/numbers-arithmetic/not-suggest-float-literal.stderr
@@ -6,10 +6,10 @@ LL |     x + 100.0
    |
    = help: the trait `Add<{float}>` is not implemented for `u8`
    = help: the following other types implement trait `Add<Rhs>`:
-             <&'a u8 as Add<u8>>
-             <&u8 as Add<&u8>>
-             <u8 as Add<&u8>>
-             <u8 as Add>
+             `&'a u8` implements `Add<u8>`
+             `&u8` implements `Add<&u8>`
+             `u8` implements `Add<&u8>`
+             `u8` implements `Add`
 
 error[E0277]: cannot add `&str` to `f64`
   --> $DIR/not-suggest-float-literal.rs:6:7
@@ -19,10 +19,10 @@ LL |     x + "foo"
    |
    = help: the trait `Add<&str>` 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>
+             `&'a f64` implements `Add<f64>`
+             `&f64` implements `Add<&f64>`
+             `f64` implements `Add<&f64>`
+             `f64` implements `Add`
 
 error[E0277]: cannot add `{integer}` to `f64`
   --> $DIR/not-suggest-float-literal.rs:11:7
@@ -32,10 +32,10 @@ LL |     x + y
    |
    = 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>
+             `&'a f64` implements `Add<f64>`
+             `&f64` implements `Add<&f64>`
+             `f64` implements `Add<&f64>`
+             `f64` implements `Add`
 
 error[E0277]: cannot subtract `{float}` from `u8`
   --> $DIR/not-suggest-float-literal.rs:15:7
@@ -45,10 +45,10 @@ LL |     x - 100.0
    |
    = help: the trait `Sub<{float}>` is not implemented for `u8`
    = help: the following other types implement trait `Sub<Rhs>`:
-             <&'a u8 as Sub<u8>>
-             <&u8 as Sub<&u8>>
-             <u8 as Sub<&u8>>
-             <u8 as Sub>
+             `&'a u8` implements `Sub<u8>`
+             `&u8` implements `Sub<&u8>`
+             `u8` implements `Sub<&u8>`
+             `u8` implements `Sub`
 
 error[E0277]: cannot subtract `&str` from `f64`
   --> $DIR/not-suggest-float-literal.rs:19:7
@@ -58,10 +58,10 @@ LL |     x - "foo"
    |
    = help: the trait `Sub<&str>` 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>
+             `&'a f64` implements `Sub<f64>`
+             `&f64` implements `Sub<&f64>`
+             `f64` implements `Sub<&f64>`
+             `f64` implements `Sub`
 
 error[E0277]: cannot subtract `{integer}` from `f64`
   --> $DIR/not-suggest-float-literal.rs:24:7
@@ -71,10 +71,10 @@ LL |     x - y
    |
    = 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>
+             `&'a f64` implements `Sub<f64>`
+             `&f64` implements `Sub<&f64>`
+             `f64` implements `Sub<&f64>`
+             `f64` implements `Sub`
 
 error[E0277]: cannot multiply `u8` by `{float}`
   --> $DIR/not-suggest-float-literal.rs:28:7
@@ -84,10 +84,10 @@ LL |     x * 100.0
    |
    = help: the trait `Mul<{float}>` is not implemented for `u8`
    = help: the following other types implement trait `Mul<Rhs>`:
-             <&'a u8 as Mul<u8>>
-             <&u8 as Mul<&u8>>
-             <u8 as Mul<&u8>>
-             <u8 as Mul>
+             `&'a u8` implements `Mul<u8>`
+             `&u8` implements `Mul<&u8>`
+             `u8` implements `Mul<&u8>`
+             `u8` implements `Mul`
 
 error[E0277]: cannot multiply `f64` by `&str`
   --> $DIR/not-suggest-float-literal.rs:32:7
@@ -97,10 +97,10 @@ LL |     x * "foo"
    |
    = help: the trait `Mul<&str>` 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>
+             `&'a f64` implements `Mul<f64>`
+             `&f64` implements `Mul<&f64>`
+             `f64` implements `Mul<&f64>`
+             `f64` implements `Mul`
 
 error[E0277]: cannot multiply `f64` by `{integer}`
   --> $DIR/not-suggest-float-literal.rs:37:7
@@ -110,10 +110,10 @@ LL |     x * y
    |
    = 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>
+             `&'a f64` implements `Mul<f64>`
+             `&f64` implements `Mul<&f64>`
+             `f64` implements `Mul<&f64>`
+             `f64` implements `Mul`
 
 error[E0277]: cannot divide `u8` by `{float}`
   --> $DIR/not-suggest-float-literal.rs:41:7
@@ -123,11 +123,11 @@ LL |     x / 100.0
    |
    = help: the trait `Div<{float}>` is not implemented for `u8`
    = help: the following other types implement trait `Div<Rhs>`:
-             <&'a u8 as Div<u8>>
-             <&u8 as Div<&u8>>
-             <u8 as Div<&u8>>
-             <u8 as Div<NonZero<u8>>>
-             <u8 as Div>
+             `&'a u8` implements `Div<u8>`
+             `&u8` implements `Div<&u8>`
+             `u8` implements `Div<&u8>`
+             `u8` implements `Div<NonZero<u8>>`
+             `u8` implements `Div`
 
 error[E0277]: cannot divide `f64` by `&str`
   --> $DIR/not-suggest-float-literal.rs:45:7
@@ -137,10 +137,10 @@ LL |     x / "foo"
    |
    = help: the trait `Div<&str>` 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>
+             `&'a f64` implements `Div<f64>`
+             `&f64` implements `Div<&f64>`
+             `f64` implements `Div<&f64>`
+             `f64` implements `Div`
 
 error[E0277]: cannot divide `f64` by `{integer}`
   --> $DIR/not-suggest-float-literal.rs:50:7
@@ -150,10 +150,10 @@ LL |     x / y
    |
    = 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>
+             `&'a f64` implements `Div<f64>`
+             `&f64` implements `Div<&f64>`
+             `f64` implements `Div<&f64>`
+             `f64` implements `Div`
 
 error: aborting due to 12 previous errors
 
diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.stderr b/tests/ui/numbers-arithmetic/suggest-float-literal.stderr
index 03779d35637..8585ac485db 100644
--- a/tests/ui/numbers-arithmetic/suggest-float-literal.stderr
+++ b/tests/ui/numbers-arithmetic/suggest-float-literal.stderr
@@ -6,10 +6,10 @@ LL |     x + 100
    |
    = 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>
+             `&'a f32` implements `Add<f32>`
+             `&f32` implements `Add<&f32>`
+             `f32` implements `Add<&f32>`
+             `f32` implements `Add`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x + 100.0
@@ -23,10 +23,10 @@ LL |     x + 100
    |
    = 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>
+             `&'a f64` implements `Add<f64>`
+             `&f64` implements `Add<&f64>`
+             `f64` implements `Add<&f64>`
+             `f64` implements `Add`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x + 100.0
@@ -40,10 +40,10 @@ LL |     x - 100
    |
    = 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>
+             `&'a f32` implements `Sub<f32>`
+             `&f32` implements `Sub<&f32>`
+             `f32` implements `Sub<&f32>`
+             `f32` implements `Sub`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x - 100.0
@@ -57,10 +57,10 @@ LL |     x - 100
    |
    = 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>
+             `&'a f64` implements `Sub<f64>`
+             `&f64` implements `Sub<&f64>`
+             `f64` implements `Sub<&f64>`
+             `f64` implements `Sub`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x - 100.0
@@ -74,10 +74,10 @@ LL |     x * 100
    |
    = 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>
+             `&'a f32` implements `Mul<f32>`
+             `&f32` implements `Mul<&f32>`
+             `f32` implements `Mul<&f32>`
+             `f32` implements `Mul`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x * 100.0
@@ -91,10 +91,10 @@ LL |     x * 100
    |
    = 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>
+             `&'a f64` implements `Mul<f64>`
+             `&f64` implements `Mul<&f64>`
+             `f64` implements `Mul<&f64>`
+             `f64` implements `Mul`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x * 100.0
@@ -108,10 +108,10 @@ LL |     x / 100
    |
    = 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>
+             `&'a f32` implements `Div<f32>`
+             `&f32` implements `Div<&f32>`
+             `f32` implements `Div<&f32>`
+             `f32` implements `Div`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x / 100.0
@@ -125,10 +125,10 @@ LL |     x / 100
    |
    = 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>
+             `&'a f64` implements `Div<f64>`
+             `&f64` implements `Div<&f64>`
+             `f64` implements `Div<&f64>`
+             `f64` implements `Div`
 help: consider using a floating-point literal by writing it with `.0`
    |
 LL |     x / 100.0