added T:Send bound to Mutex<T> to avoid specialized Drop impl.

This commit is contained in:
Felix S. Klock II 2015-03-21 13:30:26 +01:00
parent 1e71d2e71c
commit 018eeb76f0

View File

@ -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