diff --git a/src/atomic_cell.rs b/crossbeam-utils/src/atomic/atomic_cell.rs similarity index 96% rename from src/atomic_cell.rs rename to crossbeam-utils/src/atomic/atomic_cell.rs index a826130cf..cc9495d9e 100644 --- a/src/atomic_cell.rs +++ b/crossbeam-utils/src/atomic/atomic_cell.rs @@ -33,7 +33,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(7); /// ``` @@ -48,7 +48,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let mut a = AtomicCell::new(7); /// *a.get_mut() += 1; @@ -64,7 +64,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let mut a = AtomicCell::new(7); /// let v = a.into_inner(); @@ -83,7 +83,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// // This type is internally represented as `AtomicUsize` so we can just use atomic /// // operations provided by it. @@ -112,7 +112,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(7); /// @@ -135,7 +135,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(7); /// @@ -154,7 +154,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(7); /// @@ -174,7 +174,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(1); /// @@ -199,7 +199,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(1); /// @@ -239,7 +239,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -267,7 +267,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -293,7 +293,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -319,7 +319,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -345,7 +345,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -376,7 +376,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -396,7 +396,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -414,7 +414,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -432,7 +432,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -450,7 +450,7 @@ macro_rules! impl_arithmetic { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// #[doc = $example] /// @@ -505,7 +505,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(true); /// @@ -526,7 +526,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(false); /// @@ -547,7 +547,7 @@ impl AtomicCell { /// # Examples /// /// ``` - /// use crossbeam::atomic::AtomicCell; + /// use crossbeam_utils::atomic::AtomicCell; /// /// let a = AtomicCell::new(true); /// diff --git a/crossbeam-utils/src/atomic/mod.rs b/crossbeam-utils/src/atomic/mod.rs index 1c47de910..91eae0ed6 100644 --- a/crossbeam-utils/src/atomic/mod.rs +++ b/crossbeam-utils/src/atomic/mod.rs @@ -1,5 +1,7 @@ //! Additional utilities for atomics. +mod atomic_cell; mod consume; +pub use self::atomic_cell::AtomicCell; pub use self::consume::AtomicConsume; diff --git a/tests/atomic_cell.rs b/crossbeam-utils/tests/atomic_cell.rs similarity index 98% rename from tests/atomic_cell.rs rename to crossbeam-utils/tests/atomic_cell.rs index d17b98587..37c901f04 100644 --- a/tests/atomic_cell.rs +++ b/crossbeam-utils/tests/atomic_cell.rs @@ -1,9 +1,9 @@ -extern crate crossbeam; +extern crate crossbeam_utils; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering::SeqCst; -use crossbeam::atomic::AtomicCell; +use crossbeam_utils::atomic::AtomicCell; #[test] fn is_lock_free() { diff --git a/src/lib.rs b/src/lib.rs index 9e983a345..c5235c1ec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,14 +59,13 @@ mod _epoch { pub use _epoch::crossbeam_epoch as epoch; mod arc_cell; -mod atomic_cell; extern crate crossbeam_utils; /// Additional utilities for atomics. pub mod atomic { pub use arc_cell::ArcCell; - pub use atomic_cell::AtomicCell; + pub use crossbeam_utils::atomic::AtomicCell; pub use crossbeam_utils::atomic::AtomicConsume; }