-
Notifications
You must be signed in to change notification settings - Fork 117
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
Adds "unstable-exhaustive-types" as new feature. #328
base: current
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your little find and replace has changed the doc comments.
32e8b22
to
5b1d6c0
Compare
Now it should be fixed. |
This feature deactivates all "#[non_exhaustive]" added into the code. This can be used by developers to ensure, that they match all enum variants or struct fields during pattern matching.
5b1d6c0
to
b7158c9
Compare
You can already add a match case for |
No. Using my solution, if I wanted my code to compile nonetheless, I can still add a wild card arm, and everything is fine. But as long as enums or structs are marked as |
This is what I meant It does work for those But I just wanted to throw that in. Y'all can decide if banishing |
I do not know, why serenity and poise use the macro. But I want a way to let my code fail, when new variants / struct fields are added, and this is actually intended by rust. So I created this solution to get this behaviour. |
This feature deactivates all "#[non_exhaustive]" added into the code. This can be used by developers to ensure, that they match all enum variants or struct fields during pattern matching.
This does not break any existing code.