use alias-relate to structurally normalize in the solver
This commit is contained in:
parent
bbe2f6c0b2
commit
3e3e207ad7
16 changed files with 136 additions and 119 deletions
|
@ -581,11 +581,11 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
|
|||
let a_ty = goal.predicate.self_ty();
|
||||
// We need to normalize the b_ty since it's matched structurally
|
||||
// in the other functions below.
|
||||
let b_ty = match ecx
|
||||
.try_normalize_ty(goal.param_env, goal.predicate.trait_ref.args.type_at(1))
|
||||
{
|
||||
Some(b_ty) => b_ty,
|
||||
None => return vec![misc_candidate(ecx, Certainty::OVERFLOW)],
|
||||
let Ok(b_ty) = ecx.structurally_normalize_ty(
|
||||
goal.param_env,
|
||||
goal.predicate.trait_ref.args.type_at(1),
|
||||
) else {
|
||||
return vec![];
|
||||
};
|
||||
|
||||
let goal = goal.with(ecx.tcx(), (a_ty, b_ty));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue