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

RFC2229: Use the correct place type #87161

Merged
merged 1 commit into from
Jul 16, 2021
Merged

Conversation

roxelo
Copy link
Member

@roxelo roxelo commented Jul 15, 2021

Closes #87097

The ICE occurred because instead of looking at the type of the place after all the projections are applied, we instead looked at the base_ty of the Place to decide whether a discriminant should be read of not. This lead to two issues:

  1. the kind of the type is not necessarily Adt since we only look at the base_ty, it could be instead Ref for example
  2. if the kind of the type is Adt you could still be looking at the wrong variant to make a decision on whether the discriminant should be read or not

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 15, 2021
@roxelo roxelo changed the title Get the right place type RFC2229: Use the right place type Jul 15, 2021
@roxelo roxelo changed the title RFC2229: Use the right place type RFC2229: Use the correct place type Jul 15, 2021
@nikomatsakis
Copy link
Contributor

@bors r

@bors
Copy link
Contributor

bors commented Jul 15, 2021

📌 Commit 9fe470b has been approved by nikomatsakis

@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 15, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 16, 2021
…laumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#86983 (Add or improve natvis definitions for common standard library types)
 - rust-lang#87069 (ExprUseVisitor: Treat ByValue use of Copy types as ImmBorrow)
 - rust-lang#87138 (Correct invariant documentation for `steps_between`)
 - rust-lang#87145 (Make --cap-lints and related options leave crate hash alone)
 - rust-lang#87161 (RFC2229: Use the correct place type)
 - rust-lang#87162 (Fix type decl layout "overflow")
 - rust-lang#87167 (Fix sidebar display on small devices)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4143379 into rust-lang:master Jul 16, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 16, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE with capture_disjoint_fields during match MIR building
5 participants