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

Un-feature-gate struct variants #418

Merged
merged 2 commits into from
Nov 5, 2014

Conversation

sfackler
Copy link
Member

@sfackler
Copy link
Member Author

I don't know if this kind of change requires an RFC but here it is anyway!

@aturon
Copy link
Member

aturon commented Oct 27, 2014

Sounds good to me, thanks for writing this up!

@brendanzab
Copy link
Member

👍

@blaenk
Copy link
Contributor

blaenk commented Oct 28, 2014

Good idea.

@brson
Copy link
Contributor

brson commented Oct 28, 2014

I feel like we originally put this behind a gate because we were not confident about it and intended it to be on the path to deprecation. My understanding is this change is motivated because there are a fair number of libraries using it. Are we sure we like this feature now?

@netvl
Copy link

netvl commented Oct 29, 2014

+1. Struct variants are essential for nice structuring of parsing events, I use them all the time.

@luqmana
Copy link
Member

luqmana commented Nov 2, 2014

@brson I feel like we originally put the feature gate in place because there were various bugs present and just not enough people using them at the time. But, afaik all those bugs have since been fixed.

@alexcrichton
Copy link
Member

@sfackler, could you update the RFC with these changes as well to the detailed design section?

  • Forbid pub on fields of struct variants
  • The visibility of a struct variant's field is inherited from the enum itself

Other than that, this is good to go!

@sfackler
Copy link
Member Author

sfackler commented Nov 4, 2014

@alexcrichton updated

@alexcrichton alexcrichton merged commit 63e7a8b into rust-lang:master Nov 5, 2014
@alexcrichton
Copy link
Member

Tracking

Discussion

@alexcrichton
Copy link
Member

Thanks @sfackler!

@Centril Centril added A-syntax Syntax related proposals & ideas A-enum Enum related proposals & ideas A-sum-types Sum types related proposals. labels Nov 23, 2018
wycats pushed a commit to wycats/rust-rfcs that referenced this pull request Mar 5, 2019
wycats pushed a commit to wycats/rust-rfcs that referenced this pull request Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-enum Enum related proposals & ideas A-sum-types Sum types related proposals. A-syntax Syntax related proposals & ideas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants