Skip to content

Mark most C-derived enums as non_exhaustive#1474

Merged
bors[bot] merged 1 commit intonix-rust:masterfrom
asomers:non_exhaustive
Jul 29, 2021
Merged

Mark most C-derived enums as non_exhaustive#1474
bors[bot] merged 1 commit intonix-rust:masterfrom
asomers:non_exhaustive

Conversation

@asomers
Copy link
Copy Markdown
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
Copy Markdown
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
gllghr added a commit to gllghr/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)
gllghr added a commit to gllghr/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)
gllghr added a commit to gllghr/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)
gllghr added a commit to gllghr/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