Skip to content

Commit 6075af4

Browse files
committed
Document how the MutexGuard structure is created.
Also, end sentence with a period.
1 parent 6b4de8b commit 6075af4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/libstd/sync/mutex.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,14 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> { }
133133
/// dropped (falls out of scope), the lock will be unlocked.
134134
///
135135
/// The data protected by the mutex can be access through this guard via its
136-
/// `Deref` and `DerefMut` implementations
136+
/// `Deref` and `DerefMut` implementations.
137+
///
138+
/// This structure is created by the [`lock()`] and [`try_lock()`] methods on
139+
/// [`Mutex`].
140+
///
141+
/// [`lock()`]: struct.Mutex.html#method.lock
142+
/// [`try_lock()`]: struct.Mutex.html#method.try_lock
143+
/// [`Mutex`]: struct.Mutex.html
137144
#[must_use]
138145
#[stable(feature = "rust1", since = "1.0.0")]
139146
pub struct MutexGuard<'a, T: ?Sized + 'a> {

0 commit comments

Comments
 (0)