rust/compiler/rustc_trait_selection/src
Yuki Okushi d44cec3453
Rollup merge of #90819 - JakobDegen:issue-90804, r=petrochenkov
Fixes incorrect handling of TraitRefs when emitting suggestions.

Closes #90804 , although there were more issues here that were hidden by the thing that caused this ICE.

Underlying problem was that substitutions were being thrown out, which not only leads to an ICE but also incorrect diagnostics. On top of that, in some cases the self types from the root obligations were being mixed in with those from derived obligations.

This makes a couple diagnostics arguable worse ("`B<C>` does not implement `Copy`" instead of "`C` does not implement `Copy`") but the worse diagnostics are at least still correct and that downside is in my opinion clearly outweighed by the benefits of fixing the ICE and unambiguously wrong diagnostics.
2021-11-16 15:59:40 +09:00
..
traits Rollup merge of #90819 - JakobDegen:issue-90804, r=petrochenkov 2021-11-16 15:59:40 +09:00
autoderef.rs Make select_* methods return Vec for TraitEngine 2021-11-08 23:35:23 +08:00
infer.rs Move some outlives bounds things from rustc_trait_selection to rustc_typeck 2021-10-15 12:14:19 -04:00
lib.rs Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
opaque_types.rs Move instantiate_opaque_types to rustc_infer. 2021-10-28 14:12:24 +00:00