diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-29 05:24:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-29 05:24:21 +0100 |
| commit | e674b34d56b41657bddfcaa69fd224edd19f0b24 (patch) | |
| tree | 39666cd0685703790f5147260f0a57b886f016af /compiler/rustc_trait_selection/src | |
| parent | c81605ca91387cfd6717fcbd02367ce2e433fb78 (diff) | |
| parent | 4149923ff0a948161e85544c2f68dfd828ddb382 (diff) | |
| download | rust-e674b34d56b41657bddfcaa69fd224edd19f0b24.tar.gz rust-e674b34d56b41657bddfcaa69fd224edd19f0b24.zip | |
Rollup merge of #104959 - compiler-errors:revert-104269, r=lcnr
Revert #104269 (to avoid spurious hang/test failure in CI) Causes hangs/memory overflows in the test suite apparently :cry: Reopens #104225 Fixes #104957 r? ``@lcnr``
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index e96b9b64e78..b364609d986 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -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) }) } diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index eeb4693eec3..09f30f976de 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -1336,8 +1336,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { obligation.param_env, trait_pred_and_suggested_ty, ); - let suggested_ty_would_satisfy_obligation = - self.predicate_must_hold_modulo_regions(&new_obligation); + let suggested_ty_would_satisfy_obligation = self + .evaluate_obligation_no_overflow(&new_obligation) + .must_apply_modulo_regions(); if suggested_ty_would_satisfy_obligation { let sp = self .tcx |
