Skip to content

Commit

Permalink
impl From<bool> for AtomicBool
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie27 committed Nov 27, 2017
1 parent 5f44c65 commit 652a4bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 652a4bd

Please sign in to comment.