Skip to content

Commit d00d1de

Browse files
joshtripletttgross35
authored andcommitted
Require rust >= 1.40 and drop libc_non_exhaustive conditional
[ resolve conflicts - Trevor ]
1 parent 3d97cdf commit d00d1de

File tree

3 files changed

+8
-22
lines changed

3 files changed

+8
-22
lines changed

build.rs

-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1818
"libc_const_extern_fn_unstable",
1919
"libc_deny_warnings",
2020
"libc_long_array",
21-
"libc_non_exhaustive",
2221
"libc_ptr_addr_of",
2322
"libc_thread_local",
2423
"libc_underscore_const_names",
@@ -83,11 +82,6 @@ fn main() {
8382
set_cfg("libc_deny_warnings");
8483
}
8584

86-
// Rust >= 1.40 supports #[non_exhaustive].
87-
if rustc_minor_ver >= 40 || rustc_dep_of_std {
88-
set_cfg("libc_non_exhaustive");
89-
}
90-
9185
// Rust >= 1.47 supports long array:
9286
if rustc_minor_ver >= 47 || rustc_dep_of_std {
9387
set_cfg("libc_long_array");

src/unix/linux_like/linux/mod.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,14 @@ s! {
953953
pub pid: ::c_int,
954954
}
955955

956+
// linux/openat2.h
957+
#[non_exhaustive]
958+
pub struct open_how {
959+
pub flags: ::__u64,
960+
pub mode: ::__u64,
961+
pub resolve: ::__u64,
962+
}
963+
956964
#[repr(align(8))]
957965
pub struct tpacket_rollover_stats {
958966
pub tp_all: ::__u64,
@@ -6183,10 +6191,3 @@ cfg_if! {
61836191

61846192
mod arch;
61856193
pub use self::arch::*;
6186-
6187-
cfg_if! {
6188-
if #[cfg(libc_non_exhaustive)] {
6189-
mod non_exhaustive;
6190-
pub use self::non_exhaustive::*;
6191-
}
6192-
}

src/unix/linux_like/linux/non_exhaustive.rs

-9
This file was deleted.

0 commit comments

Comments
 (0)