1
Fork 0

Remove opaque type obligation and just register opaque types as they are encountered.

This also registers obligations for the hidden type immediately.
This commit is contained in:
Oli Scherer 2022-02-17 13:28:06 +00:00
parent 86e1860495
commit 1163aa7e72
60 changed files with 290 additions and 311 deletions

View file

@ -673,19 +673,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
ty::PredicateKind::TypeWellFormedFromEnv(..) => {
bug!("TypeWellFormedFromEnv is only used for chalk")
}
ty::PredicateKind::OpaqueType(a, b) => {
match self.infcx().handle_opaque_type(
a,
b,
&obligation.cause,
obligation.param_env,
) {
Ok(res) => {
self.evaluate_predicates_recursively(previous_stack, res.obligations)
}
Err(_) => Ok(EvaluatedToErr),
}
}
}
});