Skip to content

Commit fa15d78

Browse files
committed
Require rust >= 1.40 and drop libc_non_exhaustive conditional
1 parent 2bbca71 commit fa15d78

File tree

4 files changed

+9
-22
lines changed

4 files changed

+9
-22
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exclude = ["/ci/*", "/.github/*", "/.cirrus.yml", "/triagebot.toml"]
1414
description = """
1515
Raw FFI bindings to platform libraries like libc.
1616
"""
17-
rust-version = "1.37"
17+
rust-version = "1.40"
1818

1919
[package.metadata.docs.rs]
2020
features = ["const-extern-fn", "extra_traits"]

build.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ fn main() {
4242
println!("cargo:rustc-cfg=libc_deny_warnings");
4343
}
4444

45-
// Rust >= 1.40 supports #[non_exhaustive].
46-
if rustc_minor_ver >= 40 || rustc_dep_of_std {
47-
println!("cargo:rustc-cfg=libc_non_exhaustive");
48-
}
49-
5045
if rustc_minor_ver >= 51 || rustc_dep_of_std {
5146
println!("cargo:rustc-cfg=libc_ptr_addr_of");
5247
}

src/unix/linux_like/linux/mod.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,14 @@ s! {
650650
pub fd: ::c_int,
651651
pub pid: ::c_int,
652652
}
653+
654+
// linux/openat2.h
655+
#[non_exhaustive]
656+
pub struct open_how {
657+
pub flags: ::__u64,
658+
pub mode: ::__u64,
659+
pub resolve: ::__u64,
660+
}
653661
}
654662

655663
s_no_extra_traits! {
@@ -4245,10 +4253,3 @@ cfg_if! {
42454253

42464254
mod arch;
42474255
pub use self::arch::*;
4248-
4249-
cfg_if! {
4250-
if #[cfg(libc_non_exhaustive)] {
4251-
mod non_exhaustive;
4252-
pub use self::non_exhaustive::*;
4253-
}
4254-
}

src/unix/linux_like/linux/non_exhaustive.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)