Skip to content

Commit

Permalink
Added T:Send bound to Packet<T> to avoid specialized Drop impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Mar 24, 2015
1 parent 018eeb7 commit 123b5c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libstd/sync/mpsc/mod.rs
Expand Up @@ -372,7 +372,7 @@ unsafe impl<T: Send> Send for Sender<T> { }
/// The sending-half of Rust's synchronous channel type. This half can only be
/// owned by one task, but it can be cloned to send to other tasks.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct SyncSender<T> {
pub struct SyncSender<T: Send> {
inner: Arc<UnsafeCell<sync::Packet<T>>>,
}

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sync/mpsc/sync.rs
Expand Up @@ -47,7 +47,7 @@ use sync::mpsc::blocking::{self, WaitToken, SignalToken};
use sync::mpsc::select::StartResult::{self, Installed, Abort};
use sync::{Mutex, MutexGuard};

pub struct Packet<T> {
pub struct Packet<T: Send> {
/// Only field outside of the mutex. Just done for kicks, but mainly because
/// the other shared channel already had the code implemented
channels: AtomicUsize,
Expand Down

0 comments on commit 123b5c1

Please sign in to comment.