diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-11-16 19:54:28 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-11-18 01:24:21 +0300 |
| commit | 7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2 (patch) | |
| tree | 63f67955eac7b8d88a7a771a958948500d4d9f15 /src/libstd/sync/mutex.rs | |
| parent | 52acc05f6398d70e8cc506e19bb9fefbed7368ac (diff) | |
| download | rust-7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.tar.gz rust-7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.zip | |
Add missing annotations and some tests
Diffstat (limited to 'src/libstd/sync/mutex.rs')
| -rw-r--r-- | src/libstd/sync/mutex.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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<T: ?Sized> { // 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<T: ?Sized + Send> Send for Mutex<T> { } - +#[stable(feature = "rust1", since = "1.0.0")] unsafe impl<T: ?Sized + Send> Sync for Mutex<T> { } /// 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 |
