Skip to content

Commit 25e1a4a

Browse files
committed
Use target_os = redox for cfg
1 parent 79a8c27 commit 25e1a4a

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

src/libstd/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ impl File {
353353
///
354354
/// This function is only implemented on Redox, but could be
355355
/// implemented on other operating systems using readlink
356-
#[cfg(redox)]
356+
#[cfg(target_os = "redox")]
357357
#[stable(feature = "rust1", since = "1.14.0")]
358358
pub fn path(&self) -> io::Result<PathBuf> {
359359
self.inner.path()

src/libstd/os/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
#![stable(feature = "os", since = "1.0.0")]
1414
#![allow(missing_docs, bad_style)]
1515

16-
#[cfg(redox)]
17-
#[stable(feature = "rust1", since = "1.0.0")]
18-
pub use sys::ext as unix;
19-
#[cfg(unix)]
16+
#[cfg(any(target_os = "redox", unix))]
2017
#[stable(feature = "rust1", since = "1.0.0")]
2118
pub use sys::ext as unix;
2219
#[cfg(windows)]

src/libstd/sys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
3333
pub use self::imp::*;
3434

35-
#[cfg(redox)]
35+
#[cfg(target_os = "redox")]
3636
#[path = "redox/mod.rs"]
3737
mod imp;
3838

src/libstd/sys_common/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ pub mod thread_local;
4343
pub mod util;
4444
pub mod wtf8;
4545

46-
#[cfg(redox)]
46+
#[cfg(target_os = "redox")]
4747
pub use sys::net;
4848

49-
#[cfg(not(redox))]
49+
#[cfg(not(target_os = "redox"))]
5050
pub mod net;
5151

5252
#[cfg(any(not(cargobuild), feature = "backtrace"))]

0 commit comments

Comments
 (0)