-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[MIR] Cannot explicitly set discriminant #35186
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
Comments
I have long wanted to add a |
Could also use it to rewrite |
bstrie
added
the
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
label
Aug 3, 2016
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Aug 13, 2016
…akis [MIR] Add explicit SetDiscriminant StatementKind for deaggregating enums cc rust-lang#35186 To deaggregate enums, we need to be able to explicitly set the discriminant. This PR implements a new StatementKind that does that. I think some of the places that have `panics!` now could maybe do something smarter.
bors
added a commit
that referenced
this issue
Aug 13, 2016
[MIR] Add explicit SetDiscriminant StatementKind for deaggregating enums cc #35186 To deaggregate enums, we need to be able to explicitly set the discriminant. This PR implements a new StatementKind that does that. I think some of the places that have `panics!` now could maybe do something smarter.
Is this fixed now? |
The original issue is fixed, yes. |
Closed as fixed by #35348 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #35168, we might like to deaggregate enums like:
Into:
The problem (as far I know) is that the deaggregated version never sets the discrimnant.
I had some code that at least did the casting:
The text was updated successfully, but these errors were encountered: