Skip to content

Commit

Permalink
Revert "Do not need to account for overflow in predicate_can_apply"
Browse files Browse the repository at this point in the history
This reverts commit cbe9328.
  • Loading branch information
compiler-errors committed Nov 26, 2022
1 parent c285218 commit 4149923
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}

Expand Down
6 changes: 0 additions & 6 deletions src/test/ui/traits/predicate_can_apply-hang.rs

This file was deleted.

21 changes: 0 additions & 21 deletions src/test/ui/traits/predicate_can_apply-hang.stderr

This file was deleted.

0 comments on commit 4149923

Please sign in to comment.