]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
Rollup merge of #105010 - Neutron3529:patch-2, r=jyn514
[rust.git] / compiler / rustc_trait_selection / src / traits / error_reporting / mod.rs
index e96b9b64e78749c0b16184d53682699986b1380d..b364609d986ed42b6259519ad233071e8959c927 100644 (file)
@@ -2544,10 +2544,7 @@ fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'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)
         })
     }