Skip to content

Commit

Permalink
Add missing marker to std::thread::JoinGuard.
Browse files Browse the repository at this point in the history
The lifetime was previously, incorrectly unconstrained.
  • Loading branch information
huonw committed Feb 17, 2015
1 parent 22c8832 commit adfcd93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libstd/thread.rs
Expand Up @@ -151,7 +151,7 @@ use any::Any;
use boxed::Box;
use cell::UnsafeCell;
use clone::Clone;
use marker::{Send, Sync};
use marker::{Send, Sync, CovariantType};
use ops::{Drop, FnOnce};
use option::Option::{self, Some, None};
use result::Result::{Err, Ok};
Expand Down Expand Up @@ -255,6 +255,7 @@ impl Builder {
joined: false,
packet: my_packet,
thread: thread,
_marker: CovariantType,
}
}

Expand Down Expand Up @@ -487,6 +488,7 @@ pub struct JoinGuard<'a, T: 'a> {
thread: Thread,
joined: bool,
packet: Packet<T>,
_marker: CovariantType<&'a T>,
}

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

0 comments on commit adfcd93

Please sign in to comment.