From cab8c2af8e43af0ae023b3da8d5d02038e8908ab Mon Sep 17 00:00:00 2001 From: Benjamin Herr Date: Mon, 8 Feb 2016 14:48:12 +0100 Subject: [PATCH] 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. --- src/libstd/sync/mutex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index dd801e6853aee..34c9c7cf1e9e4 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.