]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
Rollup merge of #104614 - Nilstrieb:type-ascribe!, r=TaKO8Ki
[rust.git] / compiler / rustc_trait_selection / src / traits / error_reporting / mod.rs
index f44d1d71fa66c4f748901e7c849876fbdf2a9f97..049b24b39975dd3ff7e21978d667a4d40d324ee1 100644 (file)
@@ -2541,10 +2541,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)
         })
     }