diff --git a/src/sync/barrier.rs b/src/sync/barrier.rs index 0163e3fc5..9a7e2bc0a 100644 --- a/src/sync/barrier.rs +++ b/src/sync/barrier.rs @@ -10,7 +10,9 @@ use crate::sync::Mutex; /// ``` /// # async_std::task::block_on(async { /// # -/// use async_std::sync::{Arc, Barrier}; +/// use std::sync::Arc; +/// +/// use async_std::sync::Barrier; /// use async_std::task; /// /// let mut handles = Vec::with_capacity(10); @@ -121,7 +123,9 @@ impl Barrier { /// ``` /// # async_std::task::block_on(async { /// # - /// use async_std::sync::{Arc, Barrier}; + /// use std::sync::Arc; + /// + /// use async_std::sync::Barrier; /// use async_std::task; /// /// let mut handles = Vec::with_capacity(10); diff --git a/src/sync/mod.rs b/src/sync/mod.rs index d10e6bdf2..204368b3e 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -121,10 +121,6 @@ //! The following is an overview of the available synchronization //! objects: //! -//! - [`Arc`]: Atomically Reference-Counted pointer, which can be used -//! in multithreaded environments to prolong the lifetime of some -//! data until all the threads have finished using it. -//! //! - [`Barrier`]: Ensures multiple threads will wait for each other //! to reach a point in the program, before continuing execution all //! together. @@ -142,7 +138,6 @@ //! writer at a time. In some cases, this can be more efficient than //! a mutex. //! -//! [`Arc`]: crate::sync::Arc //! [`Barrier`]: crate::sync::Barrier //! [`Condvar`]: crate::sync::Condvar //! [`channel`]: fn.channel.html @@ -175,6 +170,8 @@ //! # }) //! ``` +#[cfg(feature = "unstable")] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[doc(inline)] pub use std::sync::{Arc, Weak};