Skip to content

Commit 7965a9f

Browse files
Move fortanix module position in std::os reexports for alpha sort
1 parent 1c4873c commit 7965a9f

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

Diff for: library/std/src/os/mod.rs

+34-20
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ pub mod raw;
1414
// documented don't compile (missing things in `libc` which is empty),
1515
// so just omit them with an empty module and add the "unstable" attribute.
1616

17-
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
18-
pub mod fortanix_sgx;
19-
2017
// Unix, linux, wasi and windows are handled a bit differently.
2118
#[cfg(all(
2219
doc,
@@ -56,40 +53,55 @@ pub mod wasi {}
5653
pub mod windows {}
5754

5855
// unix
59-
#[cfg(not(any(
60-
all(target_arch = "wasm32", not(target_os = "wasi")),
61-
all(target_vendor = "fortanix", target_env = "sgx")
56+
#[cfg(not(all(
57+
doc,
58+
any(
59+
all(target_arch = "wasm32", not(target_os = "wasi")),
60+
all(target_vendor = "fortanix", target_env = "sgx")
61+
)
6262
)))]
63-
#[cfg(all(not(doc), target_os = "hermit"))]
63+
#[cfg(target_os = "hermit")]
6464
#[path = "hermit/mod.rs"]
6565
pub mod unix;
66-
#[cfg(not(any(
67-
all(target_arch = "wasm32", not(target_os = "wasi")),
68-
all(target_vendor = "fortanix", target_env = "sgx")
66+
#[cfg(not(all(
67+
doc,
68+
any(
69+
all(target_arch = "wasm32", not(target_os = "wasi")),
70+
all(target_vendor = "fortanix", target_env = "sgx")
71+
)
6972
)))]
70-
#[cfg(any(unix, doc))]
73+
#[cfg(all(not(target_os = "hermit"), any(unix, doc)))]
7174
pub mod unix;
7275

7376
// linux
74-
#[cfg(not(any(
75-
all(target_arch = "wasm32", not(target_os = "wasi")),
76-
all(target_vendor = "fortanix", target_env = "sgx")
77+
#[cfg(not(all(
78+
doc,
79+
any(
80+
all(target_arch = "wasm32", not(target_os = "wasi")),
81+
all(target_vendor = "fortanix", target_env = "sgx")
82+
)
7783
)))]
7884
#[cfg(any(target_os = "linux", target_os = "l4re", doc))]
7985
pub mod linux;
8086

8187
// wasi
82-
#[cfg(not(any(
83-
all(target_arch = "wasm32", not(target_os = "wasi")),
84-
all(target_vendor = "fortanix", target_env = "sgx")
88+
#[cfg(not(all(
89+
doc,
90+
any(
91+
all(target_arch = "wasm32", not(target_os = "wasi")),
92+
all(target_vendor = "fortanix", target_env = "sgx")
93+
)
8594
)))]
8695
#[cfg(any(target_os = "wasi", doc))]
8796
pub mod wasi;
8897

8998
// windows
90-
#[cfg(not(any(
91-
all(target_arch = "wasm32", not(target_os = "wasi")),
92-
all(target_vendor = "fortanix", target_env = "sgx")
99+
#[cfg(not(all(
100+
doc,
101+
any(
102+
all(target_arch = "wasm32", not(target_os = "wasi")),
103+
all(target_vendor = "fortanix", target_env = "sgx")
104+
)
93105
)))]
94106
#[cfg(any(windows, doc))]
95107
pub mod windows;
@@ -103,6 +115,8 @@ pub mod dragonfly;
103115
pub mod emscripten;
104116
#[cfg(target_os = "espidf")]
105117
pub mod espidf;
118+
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
119+
pub mod fortanix_sgx;
106120
#[cfg(target_os = "freebsd")]
107121
pub mod freebsd;
108122
#[cfg(target_os = "fuchsia")]

0 commit comments

Comments
 (0)