Auto merge of #121462 - compiler-errors:eq-and-sub, r=lcnr

Combine `Sub` and `Equate`

Combine `Sub` and `Equate` into a new relation called `TypeRelating` (that name sounds familiar...)

Tracks the difference between `Sub` and `Equate` via `ambient_variance: ty::Variance` much like the `NllTypeRelating` relation, but implemented slightly jankier because it's a more general purpose relation.

r? lcnr
This commit is contained in:
bors
2024-03-01 10:30:42 +00:00
28 changed files with 510 additions and 841 deletions

View File

@@ -904,7 +904,6 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
&ObligationCause::dummy(),
param_env,
hidden_ty,
true,
&mut obligations,
)?;
self.add_goals(GoalSource::Misc, obligations.into_iter().map(|o| o.into()));