Skip to content
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

Perform OpaqueCast field projection on HIR, too. #114022

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 24, 2023

fixes #105819

This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field).

See #99806 for when and why we added OpaqueCast to MIR.

@rustbot
Copy link
Collaborator

rustbot commented Jul 24, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 24, 2023
@rust-log-analyzer

This comment has been minimized.

This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field).
@oli-obk oli-obk force-pushed the tait_ice_alias_field_projection branch from bf26748 to e390dc9 Compare July 24, 2023 15:19
@rustbot
Copy link
Collaborator

rustbot commented Jul 24, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@cjgillot
Copy link
Contributor

cjgillot commented Aug 3, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Aug 3, 2023

📌 Commit e390dc9 has been approved by cjgillot

It is now in the queue for this repository.

@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 Aug 3, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 3, 2023
…ction, r=cjgillot

Perform OpaqueCast field projection on HIR, too.

fixes rust-lang#105819

This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field).

See rust-lang#99806 for when and why we added OpaqueCast to MIR.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 3, 2023
…ction, r=cjgillot

Perform OpaqueCast field projection on HIR, too.

fixes rust-lang#105819

This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field).

See rust-lang#99806 for when and why we added OpaqueCast to MIR.
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 4, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#114022 (Perform OpaqueCast field projection on HIR, too.)
 - rust-lang#114253 (Compute variances for lazy type aliases)
 - rust-lang#114355 (resolve before canonicalization in new solver, ICE if unresolved)
 - rust-lang#114427 (Handle non-utf8 rpaths (fix FIXME))
 - rust-lang#114440 (bootstrap: config: fix version comparison bug)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 576bf82 into rust-lang:master Aug 4, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 4, 2023
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 11, 2023
…ction, r=cjgillot

Perform OpaqueCast field projection on HIR, too.

fixes rust-lang#105819

This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field).

See rust-lang#99806 for when and why we added OpaqueCast to MIR.
@oli-obk oli-obk deleted the tait_ice_alias_field_projection branch September 21, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: Unexpected type Alias(...) for 'Field' projection , edition 2021
6 participants