Repository: rust
Issue: Unclear error when implementing both `From<T> for U` and `TryFrom<T> for U`
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 ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=e3aa90a7aa73e047e643f2a72c79add5)): <!-- Please provide a link to play.rust-lang.org -->

```rust
use std::convert::TryFrom;

struct S {}

impl From<()> for S {
    fn from(value: ()) -> Self {
        todo!()
    }
}

impl TryFrom<()> for S {
    type Error = ();

    fn try_from(value: ()) -> Result<Self, Self::Error> {
        todo!()
    }
}

fn main() {}
```

The current output is:

```
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<()>` for type `S`
 --> src/main.rs:9:1
  |
9 | impl TryFrom<()> for S {
  | ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: conflicting implementation in crate `core`:
          - impl<T, U> TryFrom<U> for T
            where U: Into<T>;

For more information about this error, try `rustc --explain E0119`.
error: could not compile `krate` due to previous error
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<()>` for type `S`
 --> src/main.rs:9:1
  |
5 | impl From<()> for S {
  | --------------------- first implementation here
9 | impl TryFrom<()> for S {
  | ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `S`
  |
  = note: conflicting implementation in crate `core`:
          - impl<T, U> TryFrom<U> for T
            where U: Into<T>;

For more information about this error, try `rustc --explain E0119`.
error: could not compile `krate` due to previous error
```

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

Me and a colleague hit this problem while refactoring some code from `From` to `TryFrom`. We kept the `From` implementation around and additionally implemented `TryFrom`. It took us a bit of time to figure out the cause of that problem.

If you implement `From<T> for U` it auto implements `Into<U> for T` and therefore it auto implements `TryFrom<T> for U`. This is convenient, but it also makes it impossible to implement both `From` and `TryFrom` for one conversion. This kinda makes sense, but the error message could be a bit clearer about the reason for the conflict.

The proposed output is not optimal, but I'd like the error message to point at the `impl From` somehow.

<!--
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.
-->