Skip to content

Commit 77c35e2

Browse files
committed
Remove references to guards in documentation for clear_poison
1 parent b641287 commit 77c35e2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

std/src/sync/mutex.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,11 @@ impl<T: ?Sized> Mutex<T> {
365365

366366
/// Clear the poisoned state from a mutex
367367
///
368-
/// If the mutex is poisoned, it will remain poisoned until this function is called
369-
/// with a mutex guard. This allows recovering from a poisoned state and marking
370-
/// that it has recovered. For example, if the value is overwritten by a known-good value,
371-
/// then the mutex can be marked as un-poisoned. Or possibly, the value could be inspected to
372-
/// determine if it is in a consistent state, and if so the poison is removed.
368+
/// If the mutex is poisoned, it will remain poisoned until this function is called. This
369+
/// allows recovering from a poisoned state and marking that it has recovered. For example, if
370+
/// the value is overwritten by a known-good value, then the mutex can be marked as
371+
/// un-poisoned. Or possibly, the value could be inspected to determine if it is in a
372+
/// consistent state, and if so the poison is removed.
373373
///
374374
/// # Examples
375375
///

std/src/sync/rwlock.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,11 @@ impl<T: ?Sized> RwLock<T> {
368368

369369
/// Clear the poisoned state from a lock
370370
///
371-
/// If the lock is poisoned, it will remain poisoned until this function is called
372-
/// with a write guard. This allows recovering from a poisoned state and marking
373-
/// that it has recovered. For example, if the value is overwritten by a known-good value,
374-
/// then the mutex can be marked as un-poisoned. Or possibly, the value could be inspected to
375-
/// determine if it is in a consistent state, and if so the poison is removed.
371+
/// If the lock is poisoned, it will remain poisoned until this function is called. This allows
372+
/// recovering from a poisoned state and marking that it has recovered. For example, if the
373+
/// value is overwritten by a known-good value, then the mutex can be marked as un-poisoned. Or
374+
/// possibly, the value could be inspected to determine if it is in a consistent state, and if
375+
/// so the poison is removed.
376376
///
377377
/// # Examples
378378
///

0 commit comments

Comments
 (0)