mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
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.
This commit is contained in:
parent
e06f6928cb
commit
cab8c2af8e
@ -96,7 +96,7 @@ use sys_common::poison::{self, TryLockError, TryLockResult, LockResult};
|
|||||||
/// let _ = thread::spawn(move || -> () {
|
/// let _ = thread::spawn(move || -> () {
|
||||||
/// // This thread will acquire the mutex first, unwrapping the result of
|
/// // This thread will acquire the mutex first, unwrapping the result of
|
||||||
/// // `lock` because the lock has not been poisoned.
|
/// // `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
|
/// // This panic while holding the lock (`_guard` is in scope) will poison
|
||||||
/// // the mutex.
|
/// // the mutex.
|
||||||
|
Loading…
Reference in New Issue
Block a user