Skip to content

Fix consts of nullary univariant enum type. #4358

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 2 commits into from
Jan 7, 2013

Conversation

jld
Copy link
Contributor

@jld jld commented Jan 5, 2013

Currently such consts cause an internal compiler error, but there aren't any tests for them; these changes fix these problems.

jld added 2 commits January 5, 2013 00:24
This makes the const construction code match the logic in type_of.
@jld
Copy link
Contributor Author

jld commented Jan 5, 2013

I have a followup change to enable consts initialized by non-nullary constructors, which as a side-effect largely replaces the code that's changed here. I separated them because they're addressing different problems, but I could resubmit as a single pull request if that would be better.

catamorphism added a commit that referenced this pull request Jan 7, 2013
Fix consts of nullary univariant enum type.
@catamorphism catamorphism merged commit 78aad60 into rust-lang:incoming Jan 7, 2013
@catamorphism
Copy link
Contributor

Thanks!

RalfJung added a commit to RalfJung/rust that referenced this pull request Jun 1, 2025
Change unsupported diagnostic wording
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.

2 participants