Skip to content

Commit cd558a3

Browse files
committed
Add Sync bound to ScopedKey (fixes rust-lang#25894)
1 parent 474c6e0 commit cd558a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/thread/scoped_tls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ mod imp {
193193

194194
pub struct KeyInner<T> { inner: Cell<*mut T> }
195195

196-
unsafe impl<T> ::marker::Sync for KeyInner<T> { }
196+
unsafe impl<T: ::marker::Sync> ::marker::Sync for KeyInner<T> { }
197197

198198
impl<T> KeyInner<T> {
199199
pub const fn new() -> KeyInner<T> {
@@ -221,7 +221,7 @@ mod imp {
221221
pub marker: marker::PhantomData<Cell<T>>,
222222
}
223223

224-
unsafe impl<T> marker::Sync for KeyInner<T> { }
224+
unsafe impl<T: marker::Sync> marker::Sync for KeyInner<T> { }
225225

226226
impl<T> KeyInner<T> {
227227
pub const fn new() -> KeyInner<T> {

0 commit comments

Comments
 (0)