impl From<bool> for AtomicBool

This commit is contained in:
Oliver Middleton 2017-11-27 01:23:04 +00:00
parent 5f44c653cf
commit 652a4bd26c

View file

@ -927,6 +927,13 @@ impl<T> AtomicPtr<T> {
}
}
#[cfg(target_has_atomic = "8")]
#[stable(feature = "atomic_from", since = "1.23.0")]
impl From<bool> for AtomicBool {
#[inline]
fn from(b: bool) -> Self { Self::new(b) }
}
#[cfg(target_has_atomic = "ptr")]
#[stable(feature = "atomic_from", since = "1.23.0")]
impl<T> From<*mut T> for AtomicPtr<T> {