about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThayne McCombs <astrothayne@gmail.com>2022-05-20 00:15:26 -0600
committerThayne McCombs <astrothayne@gmail.com>2022-05-20 00:15:26 -0600
commita65afd82d1020f15d347268c077d4b7220268abc (patch)
treefda28371e263a6d045a54de80a2a37812d11c31d
parent66d88c9a184e4a93a1ce5383a7bec75b435bc423 (diff)
downloadrust-a65afd82d1020f15d347268c077d4b7220268abc.tar.gz
rust-a65afd82d1020f15d347268c077d4b7220268abc.zip
Remove references to guards in documentation for clear_poison
-rw-r--r--library/std/src/sync/mutex.rs10
-rw-r--r--library/std/src/sync/rwlock.rs10
2 files changed, 10 insertions, 10 deletions
diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs
index 9c305f517ef..b5832c5f7d5 100644
--- a/library/std/src/sync/mutex.rs
+++ b/library/std/src/sync/mutex.rs
@@ -365,11 +365,11 @@ impl<T: ?Sized> Mutex<T> {
 
     /// Clear the poisoned state from a mutex
     ///
-    /// If the mutex is poisoned, it will remain poisoned until this function is called
-    /// with a mutex guard. This allows 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 possibly, the value could be inspected to
-    /// determine if it is in a consistent state, and if so the poison is removed.
+    /// If the mutex 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 value is overwritten by a known-good value, then the mutex can be marked as
+    /// un-poisoned. Or possibly, the value could be inspected to determine if it is in a
+    /// consistent state, and if so the poison is removed.
     ///
     /// # Examples
     ///
diff --git a/library/std/src/sync/rwlock.rs b/library/std/src/sync/rwlock.rs
index c0cd02708a7..8d772a87bff 100644
--- a/library/std/src/sync/rwlock.rs
+++ b/library/std/src/sync/rwlock.rs
@@ -368,11 +368,11 @@ impl<T: ?Sized> RwLock<T> {
 
     /// Clear the poisoned state from a lock
     ///
-    /// If the lock is poisoned, it will remain poisoned until this function is called
-    /// with a write guard. This allows 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 possibly, the value could be inspected to
-    /// determine if it is in a consistent state, and if so the poison is removed.
+    /// 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
+    /// value is overwritten by a known-good value, then the mutex can be marked as un-poisoned. Or
+    /// possibly, the value could be inspected to determine if it is in a consistent state, and if
+    /// so the poison is removed.
     ///
     /// # Examples
     ///