@@ -14,9 +14,6 @@ pub mod raw;
14
14
// documented don't compile (missing things in `libc` which is empty),
15
15
// so just omit them with an empty module and add the "unstable" attribute.
16
16
17
- #[ cfg( all( target_vendor = "fortanix" , target_env = "sgx" ) ) ]
18
- pub mod fortanix_sgx;
19
-
20
17
// Unix, linux, wasi and windows are handled a bit differently.
21
18
#[ cfg( all(
22
19
doc,
@@ -56,40 +53,55 @@ pub mod wasi {}
56
53
pub mod windows { }
57
54
58
55
// 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
+ )
62
62
) ) ) ]
63
- #[ cfg( all ( not ( doc ) , target_os = "hermit" ) ) ]
63
+ #[ cfg( target_os = "hermit" ) ]
64
64
#[ path = "hermit/mod.rs" ]
65
65
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
+ )
69
72
) ) ) ]
70
- #[ cfg( any( unix, doc) ) ]
73
+ #[ cfg( all ( not ( target_os = "hermit" ) , any( unix, doc) ) ) ]
71
74
pub mod unix;
72
75
73
76
// 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
+ )
77
83
) ) ) ]
78
84
#[ cfg( any( target_os = "linux" , target_os = "l4re" , doc) ) ]
79
85
pub mod linux;
80
86
81
87
// 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
+ )
85
94
) ) ) ]
86
95
#[ cfg( any( target_os = "wasi" , doc) ) ]
87
96
pub mod wasi;
88
97
89
98
// 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
+ )
93
105
) ) ) ]
94
106
#[ cfg( any( windows, doc) ) ]
95
107
pub mod windows;
@@ -103,6 +115,8 @@ pub mod dragonfly;
103
115
pub mod emscripten;
104
116
#[ cfg( target_os = "espidf" ) ]
105
117
pub mod espidf;
118
+ #[ cfg( all( target_vendor = "fortanix" , target_env = "sgx" ) ) ]
119
+ pub mod fortanix_sgx;
106
120
#[ cfg( target_os = "freebsd" ) ]
107
121
pub mod freebsd;
108
122
#[ cfg( target_os = "fuchsia" ) ]
0 commit comments