Skip to content

Commit e18cd56

Browse files
authored
Conditionally re-export alloc::sync (#48)
1 parent 4cee4bc commit e18cd56

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ pub mod error;
4444
#[doc(hidden)]
4545
pub use std::*;
4646

47+
#[cfg(target_has_atomic = "ptr")]
48+
#[doc(hidden)]
49+
pub mod sync {
50+
#[cfg(not(feature = "std"))]
51+
pub use alloc::sync::*;
52+
#[cfg(feature = "std")]
53+
pub use std::sync::*;
54+
}
55+
4756
mod rand_helper;
4857
pub use rand_helper::*;
4958

0 commit comments

Comments
 (0)