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

Rename C-like enum to Field-less enum #157

Merged
merged 2 commits into from
Dec 5, 2017
Merged

Conversation

notriddle
Copy link
Contributor

There is no need to reference the C programming language to explain this concept.

There is no need to reference the C programming language to explain this concept.
@steveklabnik
Copy link
Member

As I said in the book PR, for now, this is the official name. Please get involved over here: https://internals.rust-lang.org/t/proposal-bikeshed-rename-c-like-enumeration/6209

@steveklabnik
Copy link
Member

steveklabnik commented Nov 24, 2017

@notriddle so sorry here, i completely forgot that we decided in the meeting to send in PRs, and then make the final decision that way. Gah. I'm sorry.

Let's get the lang team on this PR next week.

Copy link
Contributor

@Havvy Havvy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minus the missing word, but we need @rust-lang/lang team sign-off.

zero, and add one for each variant, in order. Each enum value is just its
discriminant which you can specify explicitly:
If there is no data attached to *any* of the variants of an enumeration,
then the discriminant can directly chosen and accessed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"can directly" -> "can be directly"

@Havvy Havvy merged commit 11f33bd into rust-lang:master Dec 5, 2017
@Havvy
Copy link
Contributor

Havvy commented Dec 5, 2017

💟 Thanks!

@notriddle notriddle deleted the patch-1 branch December 5, 2017 20:57
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