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

Fix ICE on const of nullable enum with fields in null case. #11441

Merged
merged 1 commit into from
Jan 10, 2014

Conversation

jld
Copy link
Contributor

@jld jld commented Jan 10, 2014

That is, if you have an enum type that is subject to the nullable
pointer optimization, but the null variant has a nonzero number of
fields, and you declare a static whose value is of that variant, then
that used to be an ICE but this change fixes it.

That is, if you have an enum type that is subject to the nullable
pointer optimization, but the null variant has a nonzero number of
fields, and you declare a static whose value is of that variant, then
that used to be an ICE but this change fixes it.
bors added a commit that referenced this pull request Jan 10, 2014
… r=alexcrichton

That is, if you have an enum type that is subject to the nullable
pointer optimization, but the null variant has a nonzero number of
fields, and you declare a static whose value is of that variant, then
that used to be an ICE but this change fixes it.
@bors bors closed this Jan 10, 2014
@bors bors merged commit 5487f15 into rust-lang:master Jan 10, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 8, 2024
`single_match`: fix checking of explicitly matched enums

fixes rust-lang#11365

This approach has false-negatives, but fixing them will require a significant amount of additional state tracking. The comment in `add_and_pats` has the explanation.

changelog: `single_match`: correct checking if the match explicitly matches all of an enum's variants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants