From 652a4bd26cd9adcb9b8bf03c220b0fa430a9893b Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Mon, 27 Nov 2017 01:23:04 +0000 Subject: [PATCH 1/2] impl From for AtomicBool --- src/libcore/sync/atomic.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index b7cf6d778a2f9..352e85d2b0829 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -927,6 +927,13 @@ impl AtomicPtr { } } +#[cfg(target_has_atomic = "8")] +#[stable(feature = "atomic_from", since = "1.23.0")] +impl From 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 From<*mut T> for AtomicPtr { From 71d766bd553967cfeb8a39cbcf6c2c97f3617208 Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Mon, 27 Nov 2017 21:26:19 +0000 Subject: [PATCH 2/2] Change version number for `impl From for AtomicBool` to 1.24.0 --- src/libcore/sync/atomic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index 352e85d2b0829..6fab81d76a429 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -928,7 +928,7 @@ impl AtomicPtr { } #[cfg(target_has_atomic = "8")] -#[stable(feature = "atomic_from", since = "1.23.0")] +#[stable(feature = "atomic_bool_from", since = "1.24.0")] impl From for AtomicBool { #[inline] fn from(b: bool) -> Self { Self::new(b) }