Skip to content

Commit c8f5b70

Browse files
brsonalexcrichton
authored andcommitted
std: Remove pub use globs
1 parent 4a827f5 commit c8f5b70

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

src/libstd/os.rs

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,37 +1294,47 @@ impl Drop for MemoryMap {
12941294
/// Various useful system-specific constants.
12951295
pub mod consts {
12961296
#[cfg(unix)]
1297-
pub use os::consts::unix::*;
1297+
pub use os::consts::unix::FAMILY;
12981298

12991299
#[cfg(windows)]
1300-
pub use os::consts::windows::*;
1300+
pub use os::consts::windows::FAMILY;
13011301

13021302
#[cfg(target_os = "macos")]
1303-
pub use os::consts::macos::*;
1303+
pub use os::consts::macos::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
1304+
#[cfg(target_os = "macos")]
1305+
pub use os::consts::macos::{EXE_SUFFIX, EXE_EXTENSION};
13041306

13051307
#[cfg(target_os = "freebsd")]
1306-
pub use os::consts::freebsd::*;
1308+
pub use os::consts::freebsd::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
1309+
#[cfg(target_os = "freebsd")]
1310+
pub use os::consts::freebsd::{EXE_SUFFIX, EXE_EXTENSION};
13071311

13081312
#[cfg(target_os = "linux")]
1309-
pub use os::consts::linux::*;
1313+
pub use os::consts::linux::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
1314+
#[cfg(target_os = "linux")]
1315+
pub use os::consts::linux::{EXE_SUFFIX, EXE_EXTENSION};
13101316

13111317
#[cfg(target_os = "android")]
1312-
pub use os::consts::android::*;
1318+
pub use os::consts::android::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
1319+
#[cfg(target_os = "android")]
1320+
pub use os::consts::android::{EXE_SUFFIX, EXE_EXTENSION};
13131321

13141322
#[cfg(target_os = "win32")]
1315-
pub use os::consts::win32::*;
1323+
pub use os::consts::win32::{SYSNAME, DLL_PREFIX, DLL_SUFFIX, DLL_EXTENSION};
1324+
#[cfg(target_os = "win32")]
1325+
pub use os::consts::win32::{EXE_SUFFIX, EXE_EXTENSION};
13161326

13171327
#[cfg(target_arch = "x86")]
1318-
pub use os::consts::x86::*;
1328+
pub use os::consts::x86::{ARCH};
13191329

13201330
#[cfg(target_arch = "x86_64")]
1321-
pub use os::consts::x86_64::*;
1331+
pub use os::consts::x86_64::{ARCH};
13221332

13231333
#[cfg(target_arch = "arm")]
1324-
pub use os::consts::arm::*;
1334+
pub use os::consts::arm::{ARCH};
13251335

13261336
#[cfg(target_arch = "mips")]
1327-
pub use os::consts::mips::*;
1337+
pub use os::consts::mips::{ARCH};
13281338

13291339
/// Constants for Unix systems.
13301340
pub mod unix {

src/libstd/rt/local_ptr.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ use ptr::RawPtr;
2323

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

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

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

0 commit comments

Comments
 (0)