From 0f4294b4e2887ffe9d0532564521c456bb89a780 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sat, 15 Feb 2014 12:53:23 +1100 Subject: sync: Add `#[must_use]` to the Mutex guard. This helps people remember to save the return value to keep the mutex locked as appropriate. --- src/libsync/sync/mutex.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsync/sync') diff --git a/src/libsync/sync/mutex.rs b/src/libsync/sync/mutex.rs index b37e2f3a45d..2bd85526e68 100644 --- a/src/libsync/sync/mutex.rs +++ b/src/libsync/sync/mutex.rs @@ -143,6 +143,7 @@ pub struct StaticMutex { /// An RAII implementation of a "scoped lock" of a mutex. When this structure is /// dropped (falls out of scope), the lock will be unlocked. +#[must_use] pub struct Guard<'a> { priv lock: &'a mut StaticMutex, } -- cgit 1.4.1-3-g733a5