Rollup merge of #115961 - Kriskras99:master, r=thomcc

Replace 'mutex' with 'lock' in RwLock documentation

When copying the documentation for `clear_poison` from Mutex, not every occurence of 'mutex' was replaced with 'lock'.
This commit is contained in:
Matthias Krüger 2023-10-04 05:02:03 +02:00 committed by GitHub
commit 36e234a0fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -380,7 +380,7 @@ impl<T: ?Sized> RwLock<T> {
/// ///
/// If the lock is poisoned, it will remain poisoned until this function is called. This allows /// If the lock is poisoned, it will remain poisoned until this function is called. This allows
/// recovering from a poisoned state and marking that it has recovered. For example, if the /// recovering from a poisoned state and marking that it has recovered. For example, if the
/// value is overwritten by a known-good value, then the mutex can be marked as un-poisoned. Or /// value is overwritten by a known-good value, then the lock can be marked as un-poisoned. Or
/// possibly, the value could be inspected to determine if it is in a consistent state, and if /// possibly, the value could be inspected to determine if it is in a consistent state, and if
/// so the poison is removed. /// so the poison is removed.
/// ///
@ -397,7 +397,7 @@ impl<T: ?Sized> RwLock<T> {
/// ///
/// let _ = thread::spawn(move || { /// let _ = thread::spawn(move || {
/// let _lock = c_lock.write().unwrap(); /// let _lock = c_lock.write().unwrap();
/// panic!(); // the mutex gets poisoned /// panic!(); // the lock gets poisoned
/// }).join(); /// }).join();
/// ///
/// assert_eq!(lock.is_poisoned(), true); /// assert_eq!(lock.is_poisoned(), true);