1
Fork 0

Revert "Do not need to account for overflow in predicate_can_apply"

This reverts commit cbe9328018.
This commit is contained in:
Michael Goulet 2022-11-26 22:15:51 +00:00
parent c285218f43
commit 4149923ff0
3 changed files with 1 additions and 31 deletions

View file

@ -2544,10 +2544,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
let obligation =
Obligation::new(self.tcx, ObligationCause::dummy(), param_env, cleaned_pred);
// We don't use `InferCtxt::predicate_may_hold` because that
// will re-run predicates that overflow locally, which ends up
// taking a really long time to compute.
self.evaluate_obligation(&obligation).map_or(false, |eval| eval.may_apply())
self.predicate_may_hold(&obligation)
})
}