-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Hack: Ignore inference variables in certain queries #86866
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
Conversation
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
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.
The workaround lgtm, I'll look into opening a tracking issue tomorrow if no one gets to it before me, then you can reference it in the FIXMEs
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
This comment has been minimized.
This comment has been minimized.
@bors r=oli-obk |
📌 Commit 492ba34 has been approved by |
self.tcx.param_env(closure_def_id.expect_local()), | ||
)) | ||
self.tcx | ||
.type_implements_trait(( |
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.
We use this also in the trait migration part of the code, I think we should do must_apply_modulo_regions there as well
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.
cc @roxelo
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.
Ignore this, the other method is ty_implements_trait
which uses a different query.
☀️ Test successful - checks-actions |
Fixes #84841
Fixes #86753
Some queries are not built to accept types with inference variables, which can lead to ICEs. These queries probably ought to be converted to canonical form, but as a quick workaround, we can return conservative results in the case that inference variables are found.
We should file a follow-up issue (and update the FIXMEs...) to do the proper refactoring.
cc @arora-aman
r? @oli-obk