Skip to content

Commit 5aac94a

Browse files
committed
Don't import atomics unless supported by the platform
1 parent 602dd14 commit 5aac94a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/intrinsics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ use crate::mem;
5959

6060
// These imports are used for simplifying intra-doc links
6161
#[allow(unused_imports)]
62+
#[cfg(all(target_has_atomic = "8", target_has_atomic = "32", target_has_atomic = "ptr"))]
6263
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
6364

6465
#[stable(feature = "drop_in_place", since = "1.8.0")]

0 commit comments

Comments
 (0)