]> git.lizzy.rs Git - rust.git/commitdiff
Document how the `RwLockReadGuard` structure is created.
authorCorey Farwell <coreyf@rwell.org>
Fri, 25 Nov 2016 22:43:06 +0000 (17:43 -0500)
committerCorey Farwell <coreyf@rwell.org>
Fri, 25 Nov 2016 23:57:09 +0000 (18:57 -0500)
src/libstd/sync/rwlock.rs

index f08b7641521447582b4786c64c7db41c3480268a..729ada48b44351a092581c70816403b2c5f104ea 100644 (file)
@@ -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> {