Skip to content

Commit 19c5937

Browse files
joshtripletttgross35
authored andcommitted
Require rust >= 1.15 and drop libc_priv_mod_use conditional
[ adjust build.rs changes to match current configuration - Trevor ]
1 parent 01ce562 commit 19c5937

File tree

3 files changed

+20
-53
lines changed

3 files changed

+20
-53
lines changed

build.rs

-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
2525
"libc_long_array",
2626
"libc_non_exhaustive",
2727
"libc_packedN",
28-
"libc_priv_mod_use",
2928
"libc_ptr_addr_of",
3029
"libc_thread_local",
3130
"libc_underscore_const_names",
@@ -99,11 +98,6 @@ fn main() {
9998
set_cfg("libc_deny_warnings");
10099
}
101100

102-
// Rust >= 1.15 supports private module use:
103-
if rustc_minor_ver >= 15 || rustc_dep_of_std {
104-
set_cfg("libc_priv_mod_use");
105-
}
106-
107101
// Rust >= 1.19 supports unions:
108102
if rustc_minor_ver >= 19 || rustc_dep_of_std {
109103
set_cfg("libc_union");

libc-test/build.rs

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ fn do_ctest() {
6868
fn ctest_cfg() -> ctest::TestGenerator {
6969
let mut cfg = ctest::TestGenerator::new();
7070
let libc_cfgs = [
71-
"libc_priv_mod_use",
7271
"libc_union",
7372
"libc_const_size_of",
7473
"libc_align",

src/lib.rs

+20-46
Original file line numberDiff line numberDiff line change
@@ -43,52 +43,26 @@ cfg_if! {
4343
}
4444
}
4545

46-
cfg_if! {
47-
if #[cfg(libc_priv_mod_use)] {
48-
#[cfg(libc_core_cvoid)]
49-
#[allow(unused_imports)]
50-
use core::ffi;
51-
#[allow(unused_imports)]
52-
use core::fmt;
53-
#[allow(unused_imports)]
54-
use core::hash;
55-
#[allow(unused_imports)]
56-
use core::num;
57-
#[allow(unused_imports)]
58-
use core::mem;
59-
#[doc(hidden)]
60-
#[allow(unused_imports)]
61-
use core::clone::Clone;
62-
#[doc(hidden)]
63-
#[allow(unused_imports)]
64-
use core::marker::{Copy, Send, Sync};
65-
#[doc(hidden)]
66-
#[allow(unused_imports)]
67-
use core::option::Option;
68-
} else {
69-
#[doc(hidden)]
70-
#[allow(unused_imports)]
71-
pub use core::fmt;
72-
#[doc(hidden)]
73-
#[allow(unused_imports)]
74-
pub use core::hash;
75-
#[doc(hidden)]
76-
#[allow(unused_imports)]
77-
pub use core::num;
78-
#[doc(hidden)]
79-
#[allow(unused_imports)]
80-
pub use core::mem;
81-
#[doc(hidden)]
82-
#[allow(unused_imports)]
83-
pub use core::clone::Clone;
84-
#[doc(hidden)]
85-
#[allow(unused_imports)]
86-
pub use core::marker::{Copy, Send, Sync};
87-
#[doc(hidden)]
88-
#[allow(unused_imports)]
89-
pub use core::option::Option;
90-
}
91-
}
46+
#[doc(hidden)]
47+
#[allow(unused_imports)]
48+
use core::clone::Clone;
49+
#[cfg(libc_core_cvoid)]
50+
#[allow(unused_imports)]
51+
use core::ffi;
52+
#[allow(unused_imports)]
53+
use core::fmt;
54+
#[allow(unused_imports)]
55+
use core::hash;
56+
#[doc(hidden)]
57+
#[allow(unused_imports)]
58+
use core::marker::{Copy, Send, Sync};
59+
#[allow(unused_imports)]
60+
use core::mem;
61+
#[allow(unused_imports)]
62+
use core::num;
63+
#[doc(hidden)]
64+
#[allow(unused_imports)]
65+
use core::option::Option;
9266

9367
cfg_if! {
9468
if #[cfg(windows)] {

0 commit comments

Comments
 (0)