diff options
| author | Fausto <mi9uel9@gmail.com> | 2022-03-07 15:48:35 -0500 |
|---|---|---|
| committer | Fausto <mi9uel9@gmail.com> | 2022-03-07 15:48:35 -0500 |
| commit | 776be7e73e96ffc5d5a760ebe7802b3e06062cd2 (patch) | |
| tree | 8731e85c1b65ad89be5dfac15e050067d4bfeb83 /library/std/src/sys | |
| parent | ecb867ec3cefa97a5807453a68758392730e3ed9 (diff) | |
| download | rust-776be7e73e96ffc5d5a760ebe7802b3e06062cd2.tar.gz rust-776be7e73e96ffc5d5a760ebe7802b3e06062cd2.zip | |
promot debug_assert to assert
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/rwlock.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/unix/rwlock.rs b/library/std/src/sys/unix/rwlock.rs index b1faf12c226..1318c5b8e3a 100644 --- a/library/std/src/sys/unix/rwlock.rs +++ b/library/std/src/sys/unix/rwlock.rs @@ -48,9 +48,9 @@ impl RWLock { } panic!("rwlock read lock would result in deadlock"); } else { - // According to POSIX, for a properly initialized rwlock this can only - // return EAGAIN or EDEADLK or 0. We rely on that. - debug_assert_eq!(r, 0); + // POSIX does not make guarantees about all the errors that may be returned. + // See issue #94705 for more details. + assert_eq!(r, 0, "unexpected error during rwlock read lock: {:?}", r); self.num_readers.fetch_add(1, Ordering::Relaxed); } } |
