Repository: rust
Issue: Confusing error `overflow evaluating the requirement` caused by duplicate trait impl
Labels: A-diagnostics,T-compiler,D-confusing,S-has-mcve

### Code

```Rust
use core::marker::PhantomData;

pub trait Trait {}

pub struct Wrap<T, TA>(PhantomData<(T, TA)>);

impl<T, TA> Trait for Wrap<TypeA<T>, TypeB<TA>> where Wrap<T, TA>: Trait {}
impl<T, TA> Trait for Wrap<TypeA<T>, TypeB<TA>> {}

pub struct TypeA<T>(PhantomData<T>);
pub struct TypeB<T>(PhantomData<T>);
```


### Current output

```Shell
error[E0275]: overflow evaluating the requirement `Wrap<TypeA<_>, TypeB<_>>: Trait`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`serde_with`)
note: required for `Wrap<TypeA<TypeA<_>>, TypeB<TypeB<_>>>` to implement `Trait`
 --> serde_with/src/bundled.rs:7:13
  |
7 | ...A> Trait for Wrap<TypeA<T>, TypeB<TA>> where Wrap<T, TA>: Trait {}
  |       ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^                    ----- unsatisfied trait bound introduced here
  = note: 126 redundant requirements hidden
  = note: required for `Wrap<TypeA<TypeA<TypeA<TypeA<...>>>>, ...>` to implement `Trait`
  = note: the full type name has been written to '/home/swlynch/iop-systems/serde_with/target/debug/deps/serde_with-1bf9aea32cc91d00.long-type-11176592250759541934.txt'

For more information about this error, try `rustc --explain E0275`.
error: could not compile `serde_with` (lib) due to 1 previous error
```


### Desired output

_No response_

### Rationale and extra context

_No response_

### Other cases

If there is another `impl Trait` block before the duplicate one then the error message will refer to that first `impl Trait` block
```Rust
use core::marker::PhantomData;

pub trait Trait {}

pub struct Wrap<T, TA>(PhantomData<(T, TA)>);

impl<'a, T, TA> Trait for Wrap<&'a T, &'a TA> where Wrap<T, TA>: Trait {}

impl<T, TA> Trait for Wrap<TypeA<T>, TypeB<TA>> where Wrap<T, TA>: Trait {}
impl<T, TA> Trait for Wrap<TypeA<T>, TypeB<TA>> {}

pub struct TypeA<T>(PhantomData<T>);
pub struct TypeB<T>(PhantomData<T>);
```

<details>
<summary>Error message referring to the first trait impl</summary>

```shell
error[E0275]: overflow evaluating the requirement `Wrap<&_, &_>: Trait`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`serde_with`)
note: required for `Wrap<&&_, &&_>` to implement `Trait`
 --> serde_with/src/bundled.rs:7:17
  |
7 | impl<'a, T, TA> Trait for Wrap<&'a T, &'a TA> where Wrap<T, TA>: Trait {}
  |                 ^^^^^     ^^^^^^^^^^^^^^^^^^^                    ----- unsatisfied trait bound introduced here
  = note: 126 redundant requirements hidden
  = note: required for `Wrap<&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&..., ...>` to implement `Trait`
  = note: the full type name has been written to '/home/swlynch/iop-systems/serde_with/target/debug/deps/serde_with-fc07121c1d09a764.long-type-9206076556922054995.txt'

For more information about this error, try `rustc --explain E0275`.
error: could not compile `serde_with` (lib) due to 1 previous error
```

</details>

### Rust Version

```Shell
rustc 1.77.0-nightly (ca663b06c 2024-01-08)
binary: rustc
commit-hash: ca663b06c5492ac2dde5e53cd11579fa8e4d68bd
commit-date: 2024-01-08
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6
```