Adds recursion limit into FindParamInClause#152800
Open
spirali wants to merge 3 commits intorust-lang:mainfrom
Open
Adds recursion limit into FindParamInClause#152800spirali wants to merge 3 commits intorust-lang:mainfrom
spirali wants to merge 3 commits intorust-lang:mainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
lcnr
reviewed
Feb 27, 2026
| ty.super_visit_with(self) | ||
| self.recursion_depth += 1; | ||
| if self.recursion_depth > self.ecx.cx().recursion_limit() { | ||
| return ControlFlow::Break(Err(NoSolution)); |
Contributor
There was a problem hiding this comment.
this means that we don't consider this where-bound at all, but we should consider it, just as overflow. Change the type Result to be an Result<Certainty, NoSolution> and propagate the certainty back up (conservatively treating where-bounds which overflow as non-global)
lcnr
reviewed
Mar 5, 2026
| @@ -0,0 +1,17 @@ | |||
| //@ compile-flags: -Znext-solver | |||
|
|
|||
| // Regression test for <https://github.com/rust-lang/rust/issues/152716>. | |||
Contributor
There was a problem hiding this comment.
please add a line or two explaining what this is testing/why it was wrong before
lcnr
reviewed
Mar 5, 2026
| I: Interner, | ||
| { | ||
| type Result = ControlFlow<Result<(), NoSolution>>; | ||
| type Result = ControlFlow<Result<Certainty, NoSolution>>; |
Contributor
There was a problem hiding this comment.
can you add a comment to this type explaining what the different values mean?
17ee9a9 to
fab2e8e
Compare
This comment has been minimized.
This comment has been minimized.
fab2e8e to
592246e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #152716
r? lcnr