rust/compiler/rustc_trait_selection
bors 397b66e77b Auto merge of #105285 - compiler-errors:conflicting-param-env-2, r=estebank
Highlight conflicting param-env candidates, again

Un-reverts #98794 (i.e. reverts #99290).

The previous time I attempted to land this PR, it was because of an incremental issue (#99233). The repro instructions in the issue is no longer manifest the ICE -- I think it's because this ambiguity code was refactored (I think by `@lcnr)` to no longer store the ambiguities in the fulfillment error, but instead recompute them on the fly.

The main motivation for trying to re-land this is that it fixes #105131 by highlighting the root-cause of the issue, which is conflicting param-env candidates:

```
error[E0283]: type annotations needed: cannot satisfy `Self: Gen<'source>`
   |
note: multiple `impl`s or `where` clauses satisfying `Self: Gen<'source>` found
  --> $DIR/conflicting-bounds.rs:3:1
   |
LL | pub trait Gen<'source> {
   | ^^^^^^^^^^^^^^^^^^^^^^
...
LL |         Self: for<'s> Gen<'s, Output = T>;
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0283`.
```

Fixes #105131.
Fixes (again) #98786
2022-12-15 11:11:49 +00:00
..
src Auto merge of #105285 - compiler-errors:conflicting-param-env-2, r=estebank 2022-12-15 11:11:49 +00:00
Cargo.toml Remove from compiler/ crates 2022-09-29 16:49:04 +09:00