summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2016-11-25 17:43:06 -0500
committerCorey Farwell <coreyf@rwell.org>2016-11-25 18:57:09 -0500
commit276d91d8cb9627eb9e748f1adb5c8c5f79ed4ae3 (patch)
treecbc2e2792b179007132882f55d109fcf0384764f /src/libstd/sync
parentebc037390964ba19e2094caf2b448f475888c43f (diff)
downloadrust-276d91d8cb9627eb9e748f1adb5c8c5f79ed4ae3.tar.gz
rust-276d91d8cb9627eb9e748f1adb5c8c5f79ed4ae3.zip
Document how the `RwLockReadGuard` structure is created.
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/rwlock.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index f08b7641521..729ada48b44 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -77,6 +77,13 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
 
 /// RAII structure used to release the shared read access of a lock when
 /// dropped.
+///
+/// This structure is created by the [`read()`] and [`try_read()`] methods on
+/// [`RwLock`].
+///
+/// [`read()`]: struct.RwLock.html#method.read
+/// [`try_read()`]: struct.RwLock.html#method.try_read
+/// [`RwLock`]: struct.RwLock.html
 #[must_use]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {