Skip to content

Commit 018eeb7

Browse files
committed
added T:Send bound to Mutex<T> to avoid specialized Drop impl.
1 parent 1e71d2e commit 018eeb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sync/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ use fmt;
112112
/// *guard += 1;
113113
/// ```
114114
#[stable(feature = "rust1", since = "1.0.0")]
115-
pub struct Mutex<T> {
115+
pub struct Mutex<T: Send> {
116116
// Note that this static mutex is in a *box*, not inlined into the struct
117117
// itself. Once a native mutex has been used once, its address can never
118118
// change (it can't be moved). This mutex type can be safely moved at any

0 commit comments

Comments
 (0)