about summary refs log tree commit diff
path: root/library/std/src/sync/poison/rwlock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sync/poison/rwlock.rs')
-rw-r--r--library/std/src/sync/poison/rwlock.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/sync/poison/rwlock.rs b/library/std/src/sync/poison/rwlock.rs
index f9d9321f5f2..a2abd4f692e 100644
--- a/library/std/src/sync/poison/rwlock.rs
+++ b/library/std/src/sync/poison/rwlock.rs
@@ -608,7 +608,9 @@ impl<T: ?Sized> RwLock<T> {
     /// Returns a mutable reference to the underlying data.
     ///
     /// Since this call borrows the `RwLock` mutably, no actual locking needs to
-    /// take place -- the mutable borrow statically guarantees no locks exist.
+    /// take place -- the mutable borrow statically guarantees no new locks can be acquired
+    /// while this reference exists. Note that this method does not clear any previously abandoned locks
+    /// (e.g., via [`forget()`] on a [`RwLockReadGuard`] or [`RwLockWriteGuard`]).
     ///
     /// # Errors
     ///