rust/compiler/rustc_trait_selection
Yuki Okushi 3f1c637db4
Rollup merge of #78111 - SNCPlay42:not-always-self, r=lcnr
Trait predicate ambiguities are not always in `Self`

When reporting ambiguities in trait predicates, the compiler incorrectly assumed the ambiguity was always in the type the trait should be implemented on, and never the generic parameters of the trait. This caused silly suggestions for predicates like `<KnownType as Trait<_>>`, such as giving explicit types to completely unrelated variables that happened to be of type `KnownType`.

This also reverts #73027, which worked around this issue in some cases and does not appear to be necessary any more.

fixes #77982
fixes #78055
2020-10-20 12:11:11 +09:00
..
src Rollup merge of #78111 - SNCPlay42:not-always-self, r=lcnr 2020-10-20 12:11:11 +09:00
Cargo.toml mv compiler to compiler/ 2020-08-30 18:45:07 +03:00