diff options
author | Alan Somers <asomers@gmail.com> | 2021-07-24 14:43:02 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-07-24 14:44:11 -0600 |
commit | 358adafa279ff3e6898ed49f4a2140144f121e9c (patch) | |
tree | d58fefacd019389f5131ea6a3c11b502fdcee276 /src/sys/mman.rs | |
parent | 7033d470d000a35236f157258c13dd50bc64725a (diff) | |
download | nix-358adafa279ff3e6898ed49f4a2140144f121e9c.zip |
Mark most C-derived enums as non_exhaustive
Since libc may add new variants at any time, Nix's consumers should not
use exhaustive match patterns.
Fixes #1182
Diffstat (limited to 'src/sys/mman.rs')
-rw-r--r-- | src/sys/mman.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sys/mman.rs b/src/sys/mman.rs index 58edf086..a8d6d7c9 100644 --- a/src/sys/mman.rs +++ b/src/sys/mman.rs @@ -155,6 +155,7 @@ libc_enum!{ /// /// Used by [`madvise`](./fn.madvise.html). #[repr(i32)] + #[non_exhaustive] pub enum MmapAdvise { /// No further special treatment. This is the default. MADV_NORMAL, |