Skip to content

Commit 4149923

Browse files
Revert "Do not need to account for overflow in predicate_can_apply"
This reverts commit cbe9328.
1 parent c285218 commit 4149923

File tree

3 files changed

+1
-31
lines changed

3 files changed

+1
-31
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -2544,10 +2544,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
25442544
let obligation =
25452545
Obligation::new(self.tcx, ObligationCause::dummy(), param_env, cleaned_pred);
25462546

2547-
// We don't use `InferCtxt::predicate_may_hold` because that
2548-
// will re-run predicates that overflow locally, which ends up
2549-
// taking a really long time to compute.
2550-
self.evaluate_obligation(&obligation).map_or(false, |eval| eval.may_apply())
2547+
self.predicate_may_hold(&obligation)
25512548
})
25522549
}
25532550

src/test/ui/traits/predicate_can_apply-hang.rs

-6
This file was deleted.

src/test/ui/traits/predicate_can_apply-hang.stderr

-21
This file was deleted.

0 commit comments

Comments
 (0)