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

Mark most C-derived enums as non_exhaustive #1474

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

asomers
Copy link
Member

@asomers asomers commented Jul 24, 2021

Since libc may add new variants at any time, Nix's consumers should not
use exhaustive match patterns.

Fixes #1182

Since libc may add new variants at any time, Nix's consumers should not
use exhaustive match patterns.

Fixes nix-rust#1182
Copy link
Member Author

@asomers asomers left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit 3c45e08 into nix-rust:master Jul 29, 2021
jgallag88 added a commit to jgallag88/ptools that referenced this pull request Apr 27, 2022
Update everything to latest except for nix. In nix v0.23, a number of
enums were marked #[non_exhaustive]
(nix-rust/nix#1474). Since we want exhaustive
matches in some cases, we will use v0.22 until
non_exhaustive_omitted_patterns_lint is stablized
(rust-lang/rust#89554)
jgallag88 added a commit to jgallag88/ptools that referenced this pull request Apr 27, 2022
Update everything to latest except for nix. In nix v0.23, a number of
enums were marked #[non_exhaustive]
(nix-rust/nix#1474). Since we want exhaustive
matches in some cases, we will use v0.22 until
non_exhaustive_omitted_patterns_lint is stablized
(rust-lang/rust#89554)
jgallag88 added a commit to jgallag88/ptools that referenced this pull request Apr 27, 2022
Update everything to latest except for nix. In nix v0.23, a number of
enums were marked #[non_exhaustive]
(nix-rust/nix#1474). Since we want exhaustive
matches in some cases, we will use v0.22 until
non_exhaustive_omitted_patterns_lint is stablized
(rust-lang/rust#89554)
jgallag88 added a commit to jgallag88/ptools that referenced this pull request Apr 28, 2022
Update everything to latest except for nix. In nix v0.23, a number of
enums were marked #[non_exhaustive]
(nix-rust/nix#1474). Since we want exhaustive
matches in some cases, we will use v0.22 until
non_exhaustive_omitted_patterns_lint is stablized
(rust-lang/rust#89554)
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.

Use #[non_exhaustive] after updating MSRV to 1.40.0
1 participant