diff --git a/crates/epaint/src/mutex.rs b/crates/epaint/src/mutex.rs index 1a043b37b..0aa823a75 100644 --- a/crates/epaint/src/mutex.rs +++ b/crates/epaint/src/mutex.rs @@ -27,6 +27,7 @@ mod mutex_impl { } #[inline(always)] + #[cfg_attr(debug_assertions, track_caller)] pub fn lock(&self) -> MutexGuard<'_, T> { if cfg!(debug_assertions) { self.0 @@ -157,6 +158,7 @@ mod rw_lock_impl { impl RwLock { #[inline(always)] + #[cfg_attr(debug_assertions, track_caller)] pub fn read(&self) -> RwLockReadGuard<'_, T> { let guard = if cfg!(debug_assertions) { self.0 @@ -169,6 +171,7 @@ mod rw_lock_impl { } #[inline(always)] + #[cfg_attr(debug_assertions, track_caller)] pub fn write(&self) -> RwLockWriteGuard<'_, T> { let guard = if cfg!(debug_assertions) { self.0