Skip to content

Commit 01c4f31

Browse files
committed
Fix std compilation error for wasi+atomics
1 parent 7fde083 commit 01c4f31

File tree

1 file changed

+7
-2
lines changed
  • library/std/src/sys/wasi

1 file changed

+7
-2
lines changed

library/std/src/sys/wasi/mod.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ pub mod io;
3232
#[path = "../unsupported/locks/mod.rs"]
3333
pub mod locks;
3434
pub mod net;
35-
#[path = "../unsupported/once.rs"]
36-
pub mod once;
3735
pub mod os;
3836
#[path = "../unix/os_str.rs"]
3937
pub mod os_str;
@@ -51,6 +49,13 @@ pub mod thread_local_dtor;
5149
pub mod thread_local_key;
5250
pub mod time;
5351

52+
cfg_if::cfg_if! {
53+
if #[cfg(not(target_feature = "atomics"))] {
54+
#[path = "../unsupported/once.rs"]
55+
pub mod once;
56+
}
57+
}
58+
5459
#[path = "../unsupported/common.rs"]
5560
#[deny(unsafe_op_in_unsafe_fn)]
5661
#[allow(unused)]

0 commit comments

Comments
 (0)