Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std: Remove pub use globs #13545

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions src/libstd/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1294,37 +1294,47 @@ impl Drop for MemoryMap {
/// Various useful system-specific constants.
pub mod consts {
#[cfg(unix)]
pub use os::consts::unix::*;
pub use os::consts::unix::FAMILY;

#[cfg(windows)]
pub use os::consts::windows::*;
pub use os::consts::windows::FAMILY;

#[cfg(target_os = "macos")]
pub use os::consts::macos::*;
pub use os::consts::macos::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
#[cfg(target_os = "macos")]
pub use os::consts::macos::{EXE_SUFFIX, EXE_EXTENSION};

#[cfg(target_os = "freebsd")]
pub use os::consts::freebsd::*;
pub use os::consts::freebsd::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
#[cfg(target_os = "freebsd")]
pub use os::consts::freebsd::{EXE_SUFFIX, EXE_EXTENSION};

#[cfg(target_os = "linux")]
pub use os::consts::linux::*;
pub use os::consts::linux::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
#[cfg(target_os = "linux")]
pub use os::consts::linux::{EXE_SUFFIX, EXE_EXTENSION};

#[cfg(target_os = "android")]
pub use os::consts::android::*;
pub use os::consts::android::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
#[cfg(target_os = "android")]
pub use os::consts::android::{EXE_SUFFIX, EXE_EXTENSION};

#[cfg(target_os = "win32")]
pub use os::consts::win32::*;
pub use os::consts::win32::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
#[cfg(target_os = "win32")]
pub use os::consts::win32::{EXE_SUFFIX, EXE_EXTENSION};

#[cfg(target_arch = "x86")]
pub use os::consts::x86::*;
pub use os::consts::x86::{ARCH};

#[cfg(target_arch = "x86_64")]
pub use os::consts::x86_64::*;
pub use os::consts::x86_64::{ARCH};

#[cfg(target_arch = "arm")]
pub use os::consts::arm::*;
pub use os::consts::arm::{ARCH};

#[cfg(target_arch = "mips")]
pub use os::consts::mips::*;
pub use os::consts::mips::{ARCH};

/// Constants for Unix systems.
pub mod unix {
Expand Down
6 changes: 4 additions & 2 deletions src/libstd/rt/local_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ use ptr::RawPtr;

#[cfg(windows)] // mingw-w32 doesn't like thread_local things
#[cfg(target_os = "android")] // see #10686
pub use self::native::*;
pub use self::native::{init, cleanup, put, take, try_take, unsafe_take, exists,
unsafe_borrow, try_unsafe_borrow};

#[cfg(not(windows), not(target_os = "android"))]
pub use self::compiled::*;
pub use self::compiled::{init, cleanup, put, take, try_take, unsafe_take, exists,
unsafe_borrow, try_unsafe_borrow};

/// Encapsulates a borrowed value. When this value goes out of scope, the
/// pointer is returned.
Expand Down