Skip to content

Commit 652a4bd

Browse files
committed
impl From<bool> for AtomicBool
1 parent 5f44c65 commit 652a4bd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libcore/sync/atomic.rs

+7
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,13 @@ impl<T> AtomicPtr<T> {
927927
}
928928
}
929929

930+
#[cfg(target_has_atomic = "8")]
931+
#[stable(feature = "atomic_from", since = "1.23.0")]
932+
impl From<bool> for AtomicBool {
933+
#[inline]
934+
fn from(b: bool) -> Self { Self::new(b) }
935+
}
936+
930937
#[cfg(target_has_atomic = "ptr")]
931938
#[stable(feature = "atomic_from", since = "1.23.0")]
932939
impl<T> From<*mut T> for AtomicPtr<T> {

0 commit comments

Comments
 (0)