about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2021-09-07 15:44:08 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-09-13 21:00:28 +0200
commit7965a9f14397c847e7c8efc7ff3cd1591af7cdff (patch)
treed30007b4d392fbcd708c614339ef8e7dda667921
parent1c4873c81ff3a6ae6535a114b2e0cfc5f2b5e38f (diff)
downloadrust-7965a9f14397c847e7c8efc7ff3cd1591af7cdff.tar.gz
rust-7965a9f14397c847e7c8efc7ff3cd1591af7cdff.zip
Move fortanix module position in std::os reexports for alpha sort
-rw-r--r--library/std/src/os/mod.rs54
1 files changed, 34 insertions, 20 deletions
diff --git a/library/std/src/os/mod.rs b/library/std/src/os/mod.rs
index 3f02a650e35..069a5376a44 100644
--- a/library/std/src/os/mod.rs
+++ b/library/std/src/os/mod.rs
@@ -14,9 +14,6 @@ pub mod raw;
 // documented don't compile (missing things in `libc` which is empty),
 // so just omit them with an empty module and add the "unstable" attribute.
 
-#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
-pub mod fortanix_sgx;
-
 // Unix, linux, wasi and windows are handled a bit differently.
 #[cfg(all(
     doc,
@@ -56,40 +53,55 @@ pub mod wasi {}
 pub mod windows {}
 
 // unix
-#[cfg(not(any(
-    all(target_arch = "wasm32", not(target_os = "wasi")),
-    all(target_vendor = "fortanix", target_env = "sgx")
+#[cfg(not(all(
+    doc,
+    any(
+        all(target_arch = "wasm32", not(target_os = "wasi")),
+        all(target_vendor = "fortanix", target_env = "sgx")
+    )
 )))]
-#[cfg(all(not(doc), target_os = "hermit"))]
+#[cfg(target_os = "hermit")]
 #[path = "hermit/mod.rs"]
 pub mod unix;
-#[cfg(not(any(
-    all(target_arch = "wasm32", not(target_os = "wasi")),
-    all(target_vendor = "fortanix", target_env = "sgx")
+#[cfg(not(all(
+    doc,
+    any(
+        all(target_arch = "wasm32", not(target_os = "wasi")),
+        all(target_vendor = "fortanix", target_env = "sgx")
+    )
 )))]
-#[cfg(any(unix, doc))]
+#[cfg(all(not(target_os = "hermit"), any(unix, doc)))]
 pub mod unix;
 
 // linux
-#[cfg(not(any(
-    all(target_arch = "wasm32", not(target_os = "wasi")),
-    all(target_vendor = "fortanix", target_env = "sgx")
+#[cfg(not(all(
+    doc,
+    any(
+        all(target_arch = "wasm32", not(target_os = "wasi")),
+        all(target_vendor = "fortanix", target_env = "sgx")
+    )
 )))]
 #[cfg(any(target_os = "linux", target_os = "l4re", doc))]
 pub mod linux;
 
 // wasi
-#[cfg(not(any(
-    all(target_arch = "wasm32", not(target_os = "wasi")),
-    all(target_vendor = "fortanix", target_env = "sgx")
+#[cfg(not(all(
+    doc,
+    any(
+        all(target_arch = "wasm32", not(target_os = "wasi")),
+        all(target_vendor = "fortanix", target_env = "sgx")
+    )
 )))]
 #[cfg(any(target_os = "wasi", doc))]
 pub mod wasi;
 
 // windows
-#[cfg(not(any(
-    all(target_arch = "wasm32", not(target_os = "wasi")),
-    all(target_vendor = "fortanix", target_env = "sgx")
+#[cfg(not(all(
+    doc,
+    any(
+        all(target_arch = "wasm32", not(target_os = "wasi")),
+        all(target_vendor = "fortanix", target_env = "sgx")
+    )
 )))]
 #[cfg(any(windows, doc))]
 pub mod windows;
@@ -103,6 +115,8 @@ pub mod dragonfly;
 pub mod emscripten;
 #[cfg(target_os = "espidf")]
 pub mod espidf;
+#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
+pub mod fortanix_sgx;
 #[cfg(target_os = "freebsd")]
 pub mod freebsd;
 #[cfg(target_os = "fuchsia")]