Do not need to account for overflow in predicate_can_apply
This commit is contained in:
parent
604d52108e
commit
cbe9328018
3 changed files with 31 additions and 1 deletions
|
@ -2544,7 +2544,10 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
let obligation =
|
||||
Obligation::new(self.tcx, ObligationCause::dummy(), param_env, cleaned_pred);
|
||||
|
||||
self.predicate_may_hold(&obligation)
|
||||
// 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())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue