Skip to content

Commit 276d91d

Browse files
committed
Document how the RwLockReadGuard structure is created.
1 parent ebc0373 commit 276d91d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/sync/rwlock.rs

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
7777

7878
/// RAII structure used to release the shared read access of a lock when
7979
/// dropped.
80+
///
81+
/// This structure is created by the [`read()`] and [`try_read()`] methods on
82+
/// [`RwLock`].
83+
///
84+
/// [`read()`]: struct.RwLock.html#method.read
85+
/// [`try_read()`]: struct.RwLock.html#method.try_read
86+
/// [`RwLock`]: struct.RwLock.html
8087
#[must_use]
8188
#[stable(feature = "rust1", since = "1.0.0")]
8289
pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {

0 commit comments

Comments
 (0)