-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Use #[non_exhaustive] for generated enums/flags #884
Comments
This not applicable for enums, as it already has |
It's still non-exhaustive because we might add other variants at any point, and then the |
Hm, you right, @sdroege |
gdesmott
pushed a commit
to gdesmott/gir
that referenced
this issue
Apr 10, 2020
gdesmott
pushed a commit
to gdesmott/gir
that referenced
this issue
Apr 10, 2020
Since Rust 1.40 we can use the non_exhaustive attribute to indicate that more variants may be added in the future. Adding variants to a C enum is not an API break so it makes sense to mark all the generated enum as non exhaustive. Fix gtk-rs#884
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stable since 1.40.
The text was updated successfully, but these errors were encountered: