eagerly compute sub_relations again
This commit is contained in:
@@ -126,13 +126,12 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
|
||||
}
|
||||
ty::PredicateKind::Subtype(ty::SubtypePredicate { a, b, .. })
|
||||
| ty::PredicateKind::Coerce(ty::CoercePredicate { a, b }) => {
|
||||
if self.shallow_resolve(a).is_ty_var() && self.shallow_resolve(b).is_ty_var() {
|
||||
// FIXME: We also need to register a subtype relation between these vars
|
||||
// when those are added, and if they aren't in the same sub root then
|
||||
// we should mark this goal as `has_changed`.
|
||||
Some(Certainty::AMBIGUOUS)
|
||||
} else {
|
||||
None
|
||||
match (self.shallow_resolve(a).kind(), self.shallow_resolve(b).kind()) {
|
||||
(&ty::Infer(ty::TyVar(a_vid)), &ty::Infer(ty::TyVar(b_vid))) => {
|
||||
self.sub_ty_vids_raw(a_vid, b_vid);
|
||||
Some(Certainty::AMBIGUOUS)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
ty::PredicateKind::Clause(ty::ClauseKind::ConstArgHasType(ct, _)) => {
|
||||
|
||||
Reference in New Issue
Block a user