Skip to content

Commit 24a77c5

Browse files
Don't retry in pred_known_to_hold_modulo_regions in new solver, since new solver is more complete
Just a totally unrelated nitpick I'm folding into the PR, since it's code I'd like for us to prune when the new solver lands.
1 parent f8808e0 commit 24a77c5

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+1
-1
lines changed

compiler/rustc_trait_selection/src/traits/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ fn pred_known_to_hold_modulo_regions<'tcx>(
221221

222222
if result.must_apply_modulo_regions() {
223223
true
224-
} else if result.may_apply() {
224+
} else if result.may_apply() && !infcx.next_trait_solver() {
225225
// Sometimes obligations are ambiguous because the recursive evaluator
226226
// is not smart enough, so we fall back to fulfillment when we're not certain
227227
// that an obligation holds or not. Even still, we must make sure that

0 commit comments

Comments
 (0)