From 6b4de8bf91f5cb21be3637de96b9fdd5a518f411 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Fri, 25 Nov 2016 17:46:12 -0500 Subject: Document how the `RwLockWriteGuard` structure is created. --- src/libstd/sync/rwlock.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libstd/sync') 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> { -- cgit 1.4.1-3-g733a5