about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorBenjamin Herr <ben@0x539.de>2016-02-08 14:48:12 +0100
committerBenjamin Herr <ben@0x539.de>2016-02-08 14:48:12 +0100
commitcab8c2af8e43af0ae023b3da8d5d02038e8908ab (patch)
treea60b74f797d2e7142589faac73382044ce749892 /src/libstd/sync
parente06f6928cb840a018706cabf75ab2bf3807551b1 (diff)
downloadrust-cab8c2af8e43af0ae023b3da8d5d02038e8908ab.tar.gz
rust-cab8c2af8e43af0ae023b3da8d5d02038e8908ab.zip
std: `_lock` -> `_guard` in Mutex example
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.
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.