Should "__Nonexhaustive" enum variant be recommended for future proofing? #173
Replies: 5 comments
-
Note that there's an accepted RFC for a |
Beta Was this translation helpful? Give feedback.
-
I was not aware of this RFC, it looks like the feature will be stabilized soon. I agree that it's a good idea to wait for this then. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I think we should definitely be recommending |
Beta Was this translation helpful? Give feedback.
-
For the nonexhaustive enums in Syn, |
Beta Was this translation helpful? Give feedback.
-
The
__Nonexhaustive
variant pattern is useful for allowingenum
s to grow post release. One example of use from the standard library isstd::io::ErrorKind
, and a constructed example follows this paragraph. Should this pattern be mentioned in the guidelines under future proofing?Beta Was this translation helpful? Give feedback.
All reactions