From 7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Mon, 16 Nov 2015 19:54:28 +0300 Subject: Add missing annotations and some tests --- src/libstd/sync/mutex.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstd/sync/mutex.rs') diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 48631bfc5f9..5677c5538c4 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -125,8 +125,9 @@ pub struct Mutex { // these are the only places where `T: Send` matters; all other // functionality works fine on a single thread. +#[stable(feature = "rust1", since = "1.0.0")] unsafe impl Send for Mutex { } - +#[stable(feature = "rust1", since = "1.0.0")] unsafe impl Sync for Mutex { } /// The static mutex type is provided to allow for static allocation of mutexes. @@ -175,6 +176,7 @@ pub struct MutexGuard<'a, T: ?Sized + 'a> { __poison: poison::Guard, } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T: ?Sized> !marker::Send for MutexGuard<'a, T> {} /// Static initialization of a mutex. This constant can be used to initialize -- cgit 1.4.1-3-g733a5