-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guard against infinite loop in recursive solver #569
Guard against infinite loop in recursive solver #569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with this with a comment explaining the condition. I think having an option to disable coherence isn't bad, but can definitely be left up to a followup issue. (I imagine we might just want to remove checked_program
and be explicit.)
@flodiebold want to add a comment here? |
Yeah, I actually wanted to look into making it testable, but didn't get to it yet. |
This happened in some tests in rust-analyzer. I think it can only happen with overlapping impls, so I don't know how to actually test it. (In rust-analyzer, it happened because of built-in impls provided both by RA and now Chalk.)
... to make the infinite loop regression test work.
b06622d
to
3b13808
Compare
@jackh726 @nikomatsakis I've added a comment and a way to disable coherence in tests. |
@bors r+ |
📌 Commit 3b13808 has been approved by |
☀️ Test successful - checks-actions |
This happened in some tests in rust-analyzer. I think it can only happen with overlapping impls, so I don't know how to actually test it. (In rust-analyzer, it happened because of built-in impls provided both by RA and now Chalk.)