diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 48ecae185f95..c5a03f72e290 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -63,6 +63,9 @@ use sys_common::rwlock as sys; /// assert_eq!(*w, 6); /// } // write lock is dropped here /// ``` +/// # Panics +/// +/// This function might panic when called if the lock is already held by the current thread. #[stable(feature = "rust1", since = "1.0.0")] pub struct RwLock { inner: Box,