rollup merge of #22319: huonw/send-is-not-static
Conflicts: src/libstd/sync/task_pool.rs src/libstd/thread.rs src/libtest/lib.rs src/test/bench/shootout-reverse-complement.rs src/test/bench/shootout-spectralnorm.rs
This commit is contained in:
commit
ba8ce4c2c2
49 changed files with 231 additions and 297 deletions
|
|
@ -74,11 +74,11 @@ pub struct Queue<T> {
|
|||
cache_subtractions: AtomicUsize,
|
||||
}
|
||||
|
||||
unsafe impl<T: Send> Send for Queue<T> { }
|
||||
unsafe impl<T: Send + 'static> Send for Queue<T> { }
|
||||
|
||||
unsafe impl<T: Send> Sync for Queue<T> { }
|
||||
unsafe impl<T: Send + 'static> Sync for Queue<T> { }
|
||||
|
||||
impl<T: Send> Node<T> {
|
||||
impl<T: Send + 'static> Node<T> {
|
||||
fn new() -> *mut Node<T> {
|
||||
unsafe {
|
||||
mem::transmute(box Node {
|
||||
|
|
@ -89,7 +89,7 @@ impl<T: Send> Node<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Send> Queue<T> {
|
||||
impl<T: Send + 'static> Queue<T> {
|
||||
/// Creates a new queue.
|
||||
///
|
||||
/// This is unsafe as the type system doesn't enforce a single
|
||||
|
|
@ -227,7 +227,7 @@ impl<T: Send> Queue<T> {
|
|||
}
|
||||
|
||||
#[unsafe_destructor]
|
||||
impl<T: Send> Drop for Queue<T> {
|
||||
impl<T: Send + 'static> Drop for Queue<T> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
let mut cur = *self.first.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue