]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys_common/mod.rs
Unify OsString/OsStr for byte-based implementations
[rust.git] / src / libstd / sys_common / mod.rs
index 881794d9f16da4b7ada8f45bddab490fda957f4e..883ab34f07c5832513d5a5c5753baac903ee0247 100644 (file)
@@ -1,13 +1,3 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 //! Platform-independent platform abstraction
 //!
 //! This is the platform-independent portion of the standard library's
 #![allow(missing_docs)]
 #![allow(missing_debug_implementations)]
 
-use sync::Once;
-use sys;
+use crate::sync::Once;
+use crate::sys;
 
 macro_rules! rtabort {
-    ($($t:tt)*) => (::sys_common::util::abort(format_args!($($t)*)))
+    ($($t:tt)*) => (crate::sys_common::util::abort(format_args!($($t)*)))
 }
 
 macro_rules! rtassert {
@@ -45,6 +35,13 @@ macro_rules! rtassert {
 pub mod condvar;
 pub mod io;
 pub mod mutex;
+#[cfg(any(rustdoc, // see `mod os`, docs are generated for multiple platforms
+          unix,
+          target_os = "redox",
+          target_os = "cloudabi",
+          target_arch = "wasm32",
+          all(target_vendor = "fortanix", target_env = "sgx")))]
+pub mod os_str_bytes;
 pub mod poison;
 pub mod remutex;
 pub mod rwlock;
@@ -61,8 +58,8 @@ macro_rules! rtassert {
                  target_os = "l4re",
                  target_os = "redox",
                  all(target_arch = "wasm32", not(target_os = "emscripten")),
-                 target_env = "sgx"))] {
-        pub use sys::net;
+                 all(target_vendor = "fortanix", target_env = "sgx")))] {
+        pub use crate::sys::net;
     } else {
         pub mod net;
     }