diff --git a/build.rs b/build.rs index 88f4c5149035f..b8085901d561c 100644 --- a/build.rs +++ b/build.rs @@ -25,7 +25,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[ "libc_long_array", "libc_non_exhaustive", "libc_packedN", - "libc_priv_mod_use", "libc_ptr_addr_of", "libc_thread_local", "libc_underscore_const_names", @@ -99,11 +98,6 @@ fn main() { set_cfg("libc_deny_warnings"); } - // Rust >= 1.15 supports private module use: - if rustc_minor_ver >= 15 || rustc_dep_of_std { - set_cfg("libc_priv_mod_use"); - } - // Rust >= 1.19 supports unions: if rustc_minor_ver >= 19 || rustc_dep_of_std { set_cfg("libc_union"); diff --git a/libc-test/build.rs b/libc-test/build.rs index 8283d704ee4e6..2fbaef35a94b5 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -68,7 +68,6 @@ fn do_ctest() { fn ctest_cfg() -> ctest::TestGenerator { let mut cfg = ctest::TestGenerator::new(); let libc_cfgs = [ - "libc_priv_mod_use", "libc_union", "libc_const_size_of", "libc_align", diff --git a/src/lib.rs b/src/lib.rs index 893b46ff3ab28..ffeda95e8d505 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,52 +43,26 @@ cfg_if! { } } -cfg_if! { - if #[cfg(libc_priv_mod_use)] { - #[cfg(libc_core_cvoid)] - #[allow(unused_imports)] - use core::ffi; - #[allow(unused_imports)] - use core::fmt; - #[allow(unused_imports)] - use core::hash; - #[allow(unused_imports)] - use core::num; - #[allow(unused_imports)] - use core::mem; - #[doc(hidden)] - #[allow(unused_imports)] - use core::clone::Clone; - #[doc(hidden)] - #[allow(unused_imports)] - use core::marker::{Copy, Send, Sync}; - #[doc(hidden)] - #[allow(unused_imports)] - use core::option::Option; - } else { - #[doc(hidden)] - #[allow(unused_imports)] - pub use core::fmt; - #[doc(hidden)] - #[allow(unused_imports)] - pub use core::hash; - #[doc(hidden)] - #[allow(unused_imports)] - pub use core::num; - #[doc(hidden)] - #[allow(unused_imports)] - pub use core::mem; - #[doc(hidden)] - #[allow(unused_imports)] - pub use core::clone::Clone; - #[doc(hidden)] - #[allow(unused_imports)] - pub use core::marker::{Copy, Send, Sync}; - #[doc(hidden)] - #[allow(unused_imports)] - pub use core::option::Option; - } -} +#[doc(hidden)] +#[allow(unused_imports)] +use core::clone::Clone; +#[cfg(libc_core_cvoid)] +#[allow(unused_imports)] +use core::ffi; +#[allow(unused_imports)] +use core::fmt; +#[allow(unused_imports)] +use core::hash; +#[doc(hidden)] +#[allow(unused_imports)] +use core::marker::{Copy, Send, Sync}; +#[allow(unused_imports)] +use core::mem; +#[allow(unused_imports)] +use core::num; +#[doc(hidden)] +#[allow(unused_imports)] +use core::option::Option; cfg_if! { if #[cfg(windows)] {