about summary refs log tree commit diff
path: root/src/libstd/sync/mutex.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-03-25 01:42:42 +0000
committerbors <bors@rust-lang.org>2015-03-25 01:42:42 +0000
commit593db005d4dbce2ff72009c1ba03477b031b2c0f (patch)
treeb585f5625dde7ab0af35fb3dd41a67ba0507f525 /src/libstd/sync/mutex.rs
parent123a754cb8356d0e78837dd4e58103ad801309ff (diff)
parent3021d4c56422e15331e38f4b7b04c7229e024fda (diff)
downloadrust-593db005d4dbce2ff72009c1ba03477b031b2c0f.tar.gz
rust-593db005d4dbce2ff72009c1ba03477b031b2c0f.zip
Auto merge of #23681 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sync/mutex.rs')
-rw-r--r--src/libstd/sync/mutex.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index 2bf75cf1d37..b24cfbb6899 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -112,7 +112,7 @@ use fmt;
 /// *guard += 1;
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
-pub struct Mutex<T> {
+pub struct Mutex<T: Send> {
     // Note that this static mutex is in a *box*, not inlined into the struct
     // itself. Once a native mutex has been used once, its address can never
     // change (it can't be moved). This mutex type can be safely moved at any
@@ -366,7 +366,7 @@ mod test {
     use sync::{Arc, Mutex, StaticMutex, MUTEX_INIT, Condvar};
     use thread;
 
-    struct Packet<T>(Arc<(Mutex<T>, Condvar)>);
+    struct Packet<T: Send>(Arc<(Mutex<T>, Condvar)>);
 
     unsafe impl<T: Send> Send for Packet<T> {}
     unsafe impl<T> Sync for Packet<T> {}