Skip to content

Commit

Permalink
Require rust >= 1.40 and drop libc_non_exhaustive conditional
Browse files Browse the repository at this point in the history
[ resolve conflicts - Trevor ]
  • Loading branch information
joshtriplett authored and tgross35 committed Nov 16, 2024
1 parent 3d97cdf commit d00d1de
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
6 changes: 0 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
"libc_const_extern_fn_unstable",
"libc_deny_warnings",
"libc_long_array",
"libc_non_exhaustive",
"libc_ptr_addr_of",
"libc_thread_local",
"libc_underscore_const_names",
Expand Down Expand Up @@ -83,11 +82,6 @@ fn main() {
set_cfg("libc_deny_warnings");
}

// Rust >= 1.40 supports #[non_exhaustive].
if rustc_minor_ver >= 40 || rustc_dep_of_std {
set_cfg("libc_non_exhaustive");
}

// Rust >= 1.47 supports long array:
if rustc_minor_ver >= 47 || rustc_dep_of_std {
set_cfg("libc_long_array");
Expand Down
15 changes: 8 additions & 7 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,14 @@ s! {
pub pid: ::c_int,
}

// linux/openat2.h
#[non_exhaustive]
pub struct open_how {
pub flags: ::__u64,
pub mode: ::__u64,
pub resolve: ::__u64,
}

#[repr(align(8))]
pub struct tpacket_rollover_stats {
pub tp_all: ::__u64,
Expand Down Expand Up @@ -6183,10 +6191,3 @@ cfg_if! {

mod arch;
pub use self::arch::*;

cfg_if! {
if #[cfg(libc_non_exhaustive)] {
mod non_exhaustive;
pub use self::non_exhaustive::*;
}
}
9 changes: 0 additions & 9 deletions src/unix/linux_like/linux/non_exhaustive.rs

This file was deleted.

0 comments on commit d00d1de

Please sign in to comment.