From 25e1a4a0084a56807d7a1e4ca676e078c085b3aa Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 10 Nov 2016 20:13:14 -0700 Subject: Use target_os = redox for cfg --- src/libstd/fs.rs | 2 +- src/libstd/os/mod.rs | 5 +---- src/libstd/sys/mod.rs | 2 +- src/libstd/sys_common/mod.rs | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 5845963d31a..3fc1267c06e 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -353,7 +353,7 @@ impl File { /// /// This function is only implemented on Redox, but could be /// implemented on other operating systems using readlink - #[cfg(redox)] + #[cfg(target_os = "redox")] #[stable(feature = "rust1", since = "1.14.0")] pub fn path(&self) -> io::Result { self.inner.path() diff --git a/src/libstd/os/mod.rs b/src/libstd/os/mod.rs index 744ee6c22e5..58f1604de1c 100644 --- a/src/libstd/os/mod.rs +++ b/src/libstd/os/mod.rs @@ -13,10 +13,7 @@ #![stable(feature = "os", since = "1.0.0")] #![allow(missing_docs, bad_style)] -#[cfg(redox)] -#[stable(feature = "rust1", since = "1.0.0")] -pub use sys::ext as unix; -#[cfg(unix)] +#[cfg(any(target_os = "redox", unix))] #[stable(feature = "rust1", since = "1.0.0")] pub use sys::ext as unix; #[cfg(windows)] diff --git a/src/libstd/sys/mod.rs b/src/libstd/sys/mod.rs index c196bf39432..a237d8a067e 100644 --- a/src/libstd/sys/mod.rs +++ b/src/libstd/sys/mod.rs @@ -32,7 +32,7 @@ pub use self::imp::*; -#[cfg(redox)] +#[cfg(target_os = "redox")] #[path = "redox/mod.rs"] mod imp; diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs index bbd2f679bca..5f5ea09c78d 100644 --- a/src/libstd/sys_common/mod.rs +++ b/src/libstd/sys_common/mod.rs @@ -43,10 +43,10 @@ pub mod thread_local; pub mod util; pub mod wtf8; -#[cfg(redox)] +#[cfg(target_os = "redox")] pub use sys::net; -#[cfg(not(redox))] +#[cfg(not(target_os = "redox"))] pub mod net; #[cfg(any(not(cargobuild), feature = "backtrace"))] -- cgit 1.4.1-3-g733a5