@@ -345,7 +345,7 @@ pub struct Receiver<T> {
345
345
346
346
// The receiver port can be sent from place to place, so long as it
347
347
// is not used to receive non-sendable things.
348
- unsafe impl < T : Send + ' static > Send for Receiver < T > { }
348
+ unsafe impl < T : Send > Send for Receiver < T > { }
349
349
350
350
/// An iterator over messages on a receiver, this iterator will block
351
351
/// whenever `next` is called, waiting for a new message, and `None` will be
@@ -364,7 +364,7 @@ pub struct Sender<T> {
364
364
365
365
// The send port can be sent from place to place, so long as it
366
366
// is not used to send non-sendable things.
367
- unsafe impl < T : Send + ' static > Send for Sender < T > { }
367
+ unsafe impl < T : Send > Send for Sender < T > { }
368
368
369
369
/// The sending-half of Rust's synchronous channel type. This half can only be
370
370
/// owned by one task, but it can be cloned to send to other tasks.
@@ -373,7 +373,7 @@ pub struct SyncSender<T> {
373
373
inner : Arc < UnsafeCell < sync:: Packet < T > > > ,
374
374
}
375
375
376
- unsafe impl < T : Send + ' static > Send for SyncSender < T > { }
376
+ unsafe impl < T : Send > Send for SyncSender < T > { }
377
377
378
378
impl < T > !Sync for SyncSender < T > { }
379
379
@@ -485,7 +485,7 @@ impl<T> UnsafeFlavor<T> for Receiver<T> {
485
485
/// println!("{:?}", rx.recv().unwrap());
486
486
/// ```
487
487
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
488
- pub fn channel < T : Send + ' static > ( ) -> ( Sender < T > , Receiver < T > ) {
488
+ pub fn channel < T : Send > ( ) -> ( Sender < T > , Receiver < T > ) {
489
489
let a = Arc :: new ( UnsafeCell :: new ( oneshot:: Packet :: new ( ) ) ) ;
490
490
( Sender :: new ( Flavor :: Oneshot ( a. clone ( ) ) ) , Receiver :: new ( Flavor :: Oneshot ( a) ) )
491
491
}
@@ -525,7 +525,7 @@ pub fn channel<T: Send + 'static>() -> (Sender<T>, Receiver<T>) {
525
525
/// assert_eq!(rx.recv().unwrap(), 2);
526
526
/// ```
527
527
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
528
- pub fn sync_channel < T : Send + ' static > ( bound : uint ) -> ( SyncSender < T > , Receiver < T > ) {
528
+ pub fn sync_channel < T : Send > ( bound : uint ) -> ( SyncSender < T > , Receiver < T > ) {
529
529
let a = Arc :: new ( UnsafeCell :: new ( sync:: Packet :: new ( bound) ) ) ;
530
530
( SyncSender :: new ( a. clone ( ) ) , Receiver :: new ( Flavor :: Sync ( a) ) )
531
531
}
@@ -534,7 +534,7 @@ pub fn sync_channel<T: Send + 'static>(bound: uint) -> (SyncSender<T>, Receiver<
534
534
// Sender
535
535
////////////////////////////////////////////////////////////////////////////////
536
536
537
- impl < T : Send + ' static > Sender < T > {
537
+ impl < T : Send > Sender < T > {
538
538
fn new ( inner : Flavor < T > ) -> Sender < T > {
539
539
Sender {
540
540
inner : UnsafeCell :: new ( inner) ,
@@ -616,7 +616,7 @@ impl<T: Send + 'static> Sender<T> {
616
616
}
617
617
618
618
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
619
- impl < T : Send + ' static > Clone for Sender < T > {
619
+ impl < T : Send > Clone for Sender < T > {
620
620
fn clone ( & self ) -> Sender < T > {
621
621
let ( packet, sleeper, guard) = match * unsafe { self . inner ( ) } {
622
622
Flavor :: Oneshot ( ref p) => {
@@ -662,7 +662,7 @@ impl<T: Send + 'static> Clone for Sender<T> {
662
662
663
663
#[ unsafe_destructor]
664
664
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
665
- impl < T : Send + ' static > Drop for Sender < T > {
665
+ impl < T : Send > Drop for Sender < T > {
666
666
fn drop ( & mut self ) {
667
667
match * unsafe { self . inner_mut ( ) } {
668
668
Flavor :: Oneshot ( ref mut p) => unsafe { ( * p. get ( ) ) . drop_chan ( ) ; } ,
@@ -677,7 +677,7 @@ impl<T: Send + 'static> Drop for Sender<T> {
677
677
// SyncSender
678
678
////////////////////////////////////////////////////////////////////////////////
679
679
680
- impl < T : Send + ' static > SyncSender < T > {
680
+ impl < T : Send > SyncSender < T > {
681
681
fn new ( inner : Arc < UnsafeCell < sync:: Packet < T > > > ) -> SyncSender < T > {
682
682
SyncSender { inner : inner }
683
683
}
@@ -717,7 +717,7 @@ impl<T: Send + 'static> SyncSender<T> {
717
717
}
718
718
719
719
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
720
- impl < T : Send + ' static > Clone for SyncSender < T > {
720
+ impl < T : Send > Clone for SyncSender < T > {
721
721
fn clone ( & self ) -> SyncSender < T > {
722
722
unsafe { ( * self . inner . get ( ) ) . clone_chan ( ) ; }
723
723
return SyncSender :: new ( self . inner . clone ( ) ) ;
@@ -726,7 +726,7 @@ impl<T: Send + 'static> Clone for SyncSender<T> {
726
726
727
727
#[ unsafe_destructor]
728
728
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
729
- impl < T : Send + ' static > Drop for SyncSender < T > {
729
+ impl < T : Send > Drop for SyncSender < T > {
730
730
fn drop ( & mut self ) {
731
731
unsafe { ( * self . inner . get ( ) ) . drop_chan ( ) ; }
732
732
}
@@ -736,7 +736,7 @@ impl<T: Send + 'static> Drop for SyncSender<T> {
736
736
// Receiver
737
737
////////////////////////////////////////////////////////////////////////////////
738
738
739
- impl < T : Send + ' static > Receiver < T > {
739
+ impl < T : Send > Receiver < T > {
740
740
fn new ( inner : Flavor < T > ) -> Receiver < T > {
741
741
Receiver { inner : UnsafeCell :: new ( inner) }
742
742
}
@@ -855,7 +855,7 @@ impl<T: Send + 'static> Receiver<T> {
855
855
}
856
856
}
857
857
858
- impl < T : Send + ' static > select:: Packet for Receiver < T > {
858
+ impl < T : Send > select:: Packet for Receiver < T > {
859
859
fn can_recv ( & self ) -> bool {
860
860
loop {
861
861
let new_port = match * unsafe { self . inner ( ) } {
@@ -942,15 +942,15 @@ impl<T: Send + 'static> select::Packet for Receiver<T> {
942
942
}
943
943
944
944
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
945
- impl < ' a , T : Send + ' static > Iterator for Iter < ' a , T > {
945
+ impl < ' a , T : Send > Iterator for Iter < ' a , T > {
946
946
type Item = T ;
947
947
948
948
fn next ( & mut self ) -> Option < T > { self . rx . recv ( ) . ok ( ) }
949
949
}
950
950
951
951
#[ unsafe_destructor]
952
952
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
953
- impl < T : Send + ' static > Drop for Receiver < T > {
953
+ impl < T : Send > Drop for Receiver < T > {
954
954
fn drop ( & mut self ) {
955
955
match * unsafe { self . inner_mut ( ) } {
956
956
Flavor :: Oneshot ( ref mut p) => unsafe { ( * p. get ( ) ) . drop_port ( ) ; } ,
0 commit comments