Rollup merge of #46293 - ollie27:atomic_bool_from, r=BurntSushi

impl From<bool> for AtomicBool

This seems like an obvious omission from #45610. ~~I've used the same feature name and version in the hope that this can be backported to beta so it's stabilized with the other impls. If it can't be I'll change it to `1.24.0`.~~
This commit is contained in:
kennytm
2017-11-29 18:37:50 +08:00
committed by GitHub
+7
View File
@@ -924,6 +924,13 @@ pub fn compare_exchange_weak(&self,
}
}
#[cfg(target_has_atomic = "8")]
#[stable(feature = "atomic_bool_from", since = "1.24.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> {