From cd314ab05834518dd20072684081af8afc9edb6c Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Thu, 13 Oct 2016 20:37:09 +0530 Subject: [PATCH] Updated RwLock Docs --- src/libstd/sync/rwlock.rs | 3 +++ 1 file changed, 3 insertions(+) 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,