Skip to content

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

Merged
merged 10 commits into from
Jul 4, 2021

Conversation

nikomatsakis
Copy link
Contributor

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

@rust-highfive
Copy link
Contributor

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 4, 2021
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@oli-obk oli-obk left a 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>
@rust-log-analyzer

This comment has been minimized.

@nikomatsakis
Copy link
Contributor Author

@bors r=oli-obk

@bors
Copy link
Collaborator

bors commented Jul 4, 2021

📌 Commit 492ba34 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2021
@bors
Copy link
Collaborator

bors commented Jul 4, 2021

⌛ Testing commit 492ba34 with merge 23c652d...

self.tcx.param_env(closure_def_id.expect_local()),
))
self.tcx
.type_implements_trait((
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @roxelo

Copy link
Member

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.

@bors
Copy link
Collaborator

bors commented Jul 4, 2021

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 23c652d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 4, 2021
@bors bors merged commit 23c652d into rust-lang:master Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
8 participants