about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-09 04:27:42 +0000
committerbors <bors@rust-lang.org>2016-02-09 04:27:42 +0000
commit43437dda68b29d073de2d351e5421856ddaa939a (patch)
treed8e7fed43fe2cd51cf38147c124da1387a06bb91 /src/libstd/sync
parent1cff753f466ce8d1284c61e3965b8f3d65120758 (diff)
parentcab8c2af8e43af0ae023b3da8d5d02038e8908ab (diff)
downloadrust-43437dda68b29d073de2d351e5421856ddaa939a.tar.gz
rust-43437dda68b29d073de2d351e5421856ddaa939a.zip
Auto merge of #31489 - ben0x539:lock-to-guard, r=alexcrichton
The comment in the next line was already talking about `_guard`, and the scope guard a couple lines further down is also called `guard`, so I assume that was just a typo.

r? @steveklabnik
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mutex.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index dd801e6853a..34c9c7cf1e9 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -96,7 +96,7 @@ use sys_common::poison::{self, TryLockError, TryLockResult, LockResult};
 /// let _ = thread::spawn(move || -> () {
 ///     // This thread will acquire the mutex first, unwrapping the result of
 ///     // `lock` because the lock has not been poisoned.
-///     let _lock = lock2.lock().unwrap();
+///     let _guard = lock2.lock().unwrap();
 ///
 ///     // This panic while holding the lock (`_guard` is in scope) will poison
 ///     // the mutex.