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:48:45 -0500
committerCorey Farwell <coreyf@rwell.org>2016-11-25 19:08:26 -0500
commit6075af4ac0b031f738da624ee0e9962f25f57e4c (patch)
treeba96ce46cc253a8c23f69e8c4800c3757b094e48 /src/libstd/sync
parent6b4de8bf91f5cb21be3637de96b9fdd5a518f411 (diff)
Document how the `MutexGuard` structure is created.
Also, end sentence with a period.
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mutex.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index 812724c7a16..df4a3746a49 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -133,7 +133,14 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> { }
 /// dropped (falls out of scope), the lock will be unlocked.
 ///
 /// The data protected by the mutex can be access through this guard via its
-/// `Deref` and `DerefMut` implementations
+/// `Deref` and `DerefMut` implementations.
+///
+/// This structure is created by the [`lock()`] and [`try_lock()`] methods on
+/// [`Mutex`].
+///
+/// [`lock()`]: struct.Mutex.html#method.lock
+/// [`try_lock()`]: struct.Mutex.html#method.try_lock
+/// [`Mutex`]: struct.Mutex.html
 #[must_use]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct MutexGuard<'a, T: ?Sized + 'a> {