diff options
| author | Michael Goulet <michael@errs.io> | 2025-06-26 20:15:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-26 20:15:22 -0400 |
| commit | c5ac143b2272d598e6608b3f44b19d3a31b0a5ad (patch) | |
| tree | 0a8e160a5e69cfbfecb99aa753894667bc4aacd0 /library/std/src | |
| parent | d712024aeec93f199029d2d761260a15c25b0201 (diff) | |
| parent | 7a70f642d3e91a967247ab660bf30e574ce75cca (diff) | |
| download | rust-c5ac143b2272d598e6608b3f44b19d3a31b0a5ad.tar.gz rust-c5ac143b2272d598e6608b3f44b19d3a31b0a5ad.zip | |
Rollup merge of #142967 - krikera:fix-rwlock-try-write-docs, r=jhpratt
Fix RwLock::try_write documentation for WouldBlock condition Fix RwLock::try_write documentation for WouldBlock condition The documentation incorrectly stated that try_write only fails when 'already locked exclusively', but it actually fails when there are either shared (read) or exclusive (write) locks. Fixes rust-lang/rust#142852
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sync/poison/rwlock.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sync/poison/rwlock.rs b/library/std/src/sync/poison/rwlock.rs index a060e2ea57a..934a173425a 100644 --- a/library/std/src/sync/poison/rwlock.rs +++ b/library/std/src/sync/poison/rwlock.rs @@ -481,7 +481,7 @@ impl<T: ?Sized> RwLock<T> { /// in the returned error. /// /// This function will return the [`WouldBlock`] error if the `RwLock` could - /// not be acquired because it was already locked exclusively. + /// not be acquired because it was already locked. /// /// [`Poisoned`]: TryLockError::Poisoned /// [`WouldBlock`]: TryLockError::WouldBlock |
