diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-07-27 10:50:19 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-07-27 12:28:13 -0400 |
| commit | ba5fcb726fb88cc8393f48c9f46ba03fcadf0511 (patch) | |
| tree | abbbe227f14e6553d47201ad533e8d5b91fa4672 /src/libstd/sync | |
| parent | d019a49ac86322703e1daad0ebca393856185b32 (diff) | |
| download | rust-ba5fcb726fb88cc8393f48c9f46ba03fcadf0511.tar.gz rust-ba5fcb726fb88cc8393f48c9f46ba03fcadf0511.zip | |
Show appropriate feature flags in docs
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/condvar.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/future.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/select.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sync/mutex.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/semaphore.rs | 3 |
6 files changed, 14 insertions, 7 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index f2c389f9426..79b3dfa67b1 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -69,7 +69,8 @@ pub struct Condvar { inner: Box<StaticCondvar> } /// # Examples /// /// ``` -/// # #![feature(static_condvar)] +/// #![feature(static_condvar)] +/// /// use std::sync::{StaticCondvar, CONDVAR_INIT}; /// /// static CVAR: StaticCondvar = CONDVAR_INIT; diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs index 28dc124f033..b87a2756829 100644 --- a/src/libstd/sync/future.rs +++ b/src/libstd/sync/future.rs @@ -14,7 +14,8 @@ //! # Examples //! //! ``` -//! # #![feature(future)] +//! #![feature(future)] +//! //! use std::sync::Future; //! //! // a fake, for now diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs index a67138742ae..ee1516342ad 100644 --- a/src/libstd/sync/mpsc/select.rs +++ b/src/libstd/sync/mpsc/select.rs @@ -27,7 +27,8 @@ //! # Examples //! //! ```rust -//! # #![feature(mpsc_select)] +//! #![feature(mpsc_select)] +//! //! use std::sync::mpsc::channel; //! //! let (tx1, rx1) = channel(); @@ -124,7 +125,8 @@ impl Select { /// # Examples /// /// ``` - /// # #![feature(mpsc_select)] + /// #![feature(mpsc_select)] + /// /// use std::sync::mpsc::Select; /// /// let select = Select::new(); diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 41cd11e4c69..4b62434d068 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -138,7 +138,8 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> { } /// # Examples /// /// ``` -/// # #![feature(static_mutex)] +/// #![feature(static_mutex)] +/// /// use std::sync::{StaticMutex, MUTEX_INIT}; /// /// static LOCK: StaticMutex = MUTEX_INIT; diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 4ca2e282f70..40d5af49156 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -81,7 +81,8 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {} /// # Examples /// /// ``` -/// # #![feature(static_rwlock)] +/// #![feature(static_rwlock)] +/// /// use std::sync::{StaticRwLock, RW_LOCK_INIT}; /// /// static LOCK: StaticRwLock = RW_LOCK_INIT; diff --git a/src/libstd/sync/semaphore.rs b/src/libstd/sync/semaphore.rs index dc9e467a8b1..907df69bfb0 100644 --- a/src/libstd/sync/semaphore.rs +++ b/src/libstd/sync/semaphore.rs @@ -25,7 +25,8 @@ use sync::{Mutex, Condvar}; /// # Examples /// /// ``` -/// # #![feature(semaphore)] +/// #![feature(semaphore)] +/// /// use std::sync::Semaphore; /// /// // Create a semaphore that represents 5 resources |
