Skip to content

Commit 1ed5842

Browse files
committed
Fallout: extend thread with phantomdata for 'a lifetime
1 parent 62b5177 commit 1ed5842

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/thread.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ use any::Any;
153153
use cell::UnsafeCell;
154154
use fmt;
155155
use io;
156-
use marker;
156+
use marker::{PhantomData, Send, Sync};
157157
use old_io::stdio;
158158
use rt::{self, unwind};
159159
use sync::{Mutex, Condvar, Arc};
@@ -260,7 +260,7 @@ impl Builder {
260260
T: Send + 'a, F: FnOnce() -> T, F: Send + 'a
261261
{
262262
self.spawn_inner(Thunk::new(f)).map(|inner| {
263-
JoinGuard { inner: inner, _marker: marker::CovariantType }
263+
JoinGuard { inner: inner, _marker: PhantomData }
264264
})
265265
}
266266

@@ -642,7 +642,7 @@ impl Drop for JoinHandle {
642642
#[stable(feature = "rust1", since = "1.0.0")]
643643
pub struct JoinGuard<'a, T: 'a> {
644644
inner: JoinInner<T>,
645-
_marker: marker::CovariantType<&'a T>,
645+
_marker: PhantomData<&'a T>,
646646
}
647647

648648
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)