From 1347de084ddb6ee6a671beb97a8598588223e7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Wed, 17 Jun 2020 22:57:15 +0200 Subject: [PATCH] Fix incorrect doc comments. --- lock_api/src/mutex.rs | 5 +++++ lock_api/src/remutex.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lock_api/src/mutex.rs b/lock_api/src/mutex.rs index 782c0673..0f425781 100644 --- a/lock_api/src/mutex.rs +++ b/lock_api/src/mutex.rs @@ -94,6 +94,11 @@ pub unsafe trait RawMutexFair: RawMutex { /// by `lock`, however it can be much more efficient in the case where there /// are no waiting threads. /// + /// # Safety + /// + /// This method may only be called if the mutex is held in the current context, see + /// the documentation of [`unlock`]. + /// /// [`unlock`]: trait.RawMutex.html#tymethod.unlock unsafe fn bump(&self) { self.unlock_fair(); diff --git a/lock_api/src/remutex.rs b/lock_api/src/remutex.rs index 79b8f424..4de8c88e 100644 --- a/lock_api/src/remutex.rs +++ b/lock_api/src/remutex.rs @@ -161,6 +161,8 @@ impl RawReentrantMutex { /// by `lock`, however it can be much more efficient in the case where there /// are no waiting threads. /// + /// # Safety + /// /// This method may only be called if the mutex is held by the current thread. #[inline] pub unsafe fn bump(&self) {