Repository: rust
Issue: Suggest arithmetic promotion conversion using `as` where appropriate
Labels: A-diagnostics,T-compiler

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: [link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=3e712bd6fac9179444a638e8adadab31)

```rust
fn main() {
    let a = 12;
    let b : f32 = 3.4;
    let c : f64 = 5.6;
    println!("Ex 1 : {}", a + b);
    println!("Ex 2 : {}", a + c);
    println!("Ex 3 : {}", b + c);
}
```

The current output is:

```
Compiling playground v0.0.1 (/playground)
error[[E0277]](https://doc.rust-lang.org/nightly/error-index.html#E0277): cannot add `f32` to `{integer}`
 --> src/main.rs:5:29
  |
5 |     println!("Ex 1 : {}", a + b);
  |                             ^ no implementation for `{integer} + f32`
  |
  = help: the trait `Add<f32>` is not implemented for `{integer}`
  = 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

error[[E0277]](https://doc.rust-lang.org/nightly/error-index.html#E0277): cannot add `f64` to `{integer}`
 --> src/main.rs:6:29
  |
6 |     println!("Ex 2 : {}", a + c);
  |                             ^ no implementation for `{integer} + f64`
  |
  = help: the trait `Add<f64>` is not implemented for `{integer}`
  = 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

error[[E0308]](https://doc.rust-lang.org/nightly/error-index.html#E0308): mismatched types
 --> src/main.rs:7:31
  |
7 |     println!("Ex 3 : {}", b + c);
  |                               ^ expected `f32`, found `f64`

error[[E0277]](https://doc.rust-lang.org/nightly/error-index.html#E0277): cannot add `f64` to `f32`
 --> src/main.rs:7:29
  |
7 |     println!("Ex 3 : {}", b + c);
  |                             ^ no implementation for `f32 + f64`
  |
  = help: the trait `Add<f64>` 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

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `playground` due to 4 previous errors
```

<!-- The following is not always necessary. -->
Ideally the output should suggest using `as` to do a promoting conversion  (i.e. convert one of the type to something of a larger size, e.g f32 -> f64) if it can resolve the error at hand, where appropriate. On the other hand, I think the second help in the current diagnostics showing other types implementing the trait `Add<Rhs>` is a little verbose (maybe collapsing an additional line or two). This suggestion can be ignored if unnecessary or not desirable.

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->