about 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:46:12 -0500
committerCorey Farwell <coreyf@rwell.org>2016-11-25 18:57:11 -0500
commit6b4de8bf91f5cb21be3637de96b9fdd5a518f411 (patch)
tree23e6ee47153c82f9e33134664fdde3d3ad83fee4 /src/libstd/sync
parent276d91d8cb9627eb9e748f1adb5c8c5f79ed4ae3 (diff)
downloadrust-6b4de8bf91f5cb21be3637de96b9fdd5a518f411.tar.gz
rust-6b4de8bf91f5cb21be3637de96b9fdd5a518f411.zip
Document how the `RwLockWriteGuard` 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 729ada48b44..f83cf7ba9c2 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -95,6 +95,13 @@ impl<'a, T: ?Sized> !marker::Send for RwLockReadGuard<'a, T> {}
 
 /// RAII structure used to release the exclusive write access of a lock when
 /// dropped.
+///
+/// This structure is created by the [`write()`] and [`try_write()`] methods
+/// on [`RwLock`].
+///
+/// [`write()`]: struct.RwLock.html#method.write
+/// [`try_write()`]: struct.RwLock.html#method.try_write
+/// [`RwLock`]: struct.RwLock.html
 #[must_use]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {