about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-28 12:05:12 -0700
committerbors <bors@rust-lang.org>2013-06-28 12:05:12 -0700
commitf44b951a1ea40b61508b2d0abb3f239797f885c5 (patch)
tree326ffc88eb48938b5c57daad927cf6e7462a13e1 /src/libstd/rt
parent4e4e2f70c90f01b5be22a192c883b9dcb34df7ff (diff)
parent4f044891a5457acb06338c78f9aa58d8b4c9d53f (diff)
downloadrust-f44b951a1ea40b61508b2d0abb3f239797f885c5.tar.gz
rust-f44b951a1ea40b61508b2d0abb3f239797f885c5.zip
auto merge of #7451 : cmr/rust/rewrite-each-path, r=pcwalton
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/comm.rs10
-rw-r--r--src/libstd/rt/io/extensions.rs7
-rw-r--r--src/libstd/rt/message_queue.rs4
-rw-r--r--src/libstd/rt/work_queue.rs4
4 files changed, 14 insertions, 11 deletions
diff --git a/src/libstd/rt/comm.rs b/src/libstd/rt/comm.rs
index 75b1d8f3810..72907f40a07 100644
--- a/src/libstd/rt/comm.rs
+++ b/src/libstd/rt/comm.rs
@@ -19,7 +19,7 @@ use option::*;
 use cast;
 use util;
 use ops::Drop;
-use kinds::Owned;
+use kinds::Send;
 use rt::sched::{Scheduler, Coroutine};
 use rt::local::Local;
 use unstable::intrinsics::{atomic_xchg, atomic_load};
@@ -68,7 +68,7 @@ pub struct PortOneHack<T> {
     suppress_finalize: bool
 }
 
-pub fn oneshot<T: Owned>() -> (PortOne<T>, ChanOne<T>) {
+pub fn oneshot<T: Send>() -> (PortOne<T>, ChanOne<T>) {
     let packet: ~Packet<T> = ~Packet {
         state: STATE_BOTH,
         payload: None
@@ -307,20 +307,20 @@ pub struct Port<T> {
     next: Cell<PortOne<StreamPayload<T>>>
 }
 
-pub fn stream<T: Owned>() -> (Port<T>, Chan<T>) {
+pub fn stream<T: Send>() -> (Port<T>, Chan<T>) {
     let (pone, cone) = oneshot();
     let port = Port { next: Cell::new(pone) };
     let chan = Chan { next: Cell::new(cone) };
     return (port, chan);
 }
 
-impl<T: Owned> GenericChan<T> for Chan<T> {
+impl<T: Send> GenericChan<T> for Chan<T> {
     fn send(&self, val: T) {
         self.try_send(val);
     }
 }
 
-impl<T: Owned> GenericSmartChan<T> for Chan<T> {
+impl<T: Send> GenericSmartChan<T> for Chan<T> {
     fn try_send(&self, val: T) -> bool {
         let (next_pone, next_cone) = oneshot();
         let cone = self.next.take();
diff --git a/src/libstd/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs
index 1f82a9cd963..c6654e9dabe 100644
--- a/src/libstd/rt/io/extensions.rs
+++ b/src/libstd/rt/io/extensions.rs
@@ -343,7 +343,9 @@ impl<T: Reader> ReaderByteConversions for T {
     fn read_le_uint_n(&mut self, nbytes: uint) -> u64 {
         assert!(nbytes > 0 && nbytes <= 8);
 
-        let mut (val, pos, i) = (0u64, 0, nbytes);
+        let mut val = 0u64;
+        let mut pos = 0;
+        let mut i = nbytes;
         while i > 0 {
             val += (self.read_u8() as u64) << pos;
             pos += 8;
@@ -359,7 +361,8 @@ impl<T: Reader> ReaderByteConversions for T {
     fn read_be_uint_n(&mut self, nbytes: uint) -> u64 {
         assert!(nbytes > 0 && nbytes <= 8);
 
-        let mut (val, i) = (0u64, nbytes);
+        let mut val = 0u64;
+        let mut i = nbytes;
         while i > 0 {
             i -= 1;
             val += (self.read_u8() as u64) << i * 8;
diff --git a/src/libstd/rt/message_queue.rs b/src/libstd/rt/message_queue.rs
index 5b60543344d..d561e81d032 100644
--- a/src/libstd/rt/message_queue.rs
+++ b/src/libstd/rt/message_queue.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use container::Container;
-use kinds::Owned;
+use kinds::Send;
 use vec::OwnedVector;
 use cell::Cell;
 use option::*;
@@ -21,7 +21,7 @@ pub struct MessageQueue<T> {
     priv queue: ~Exclusive<~[T]>
 }
 
-impl<T: Owned> MessageQueue<T> {
+impl<T: Send> MessageQueue<T> {
     pub fn new() -> MessageQueue<T> {
         MessageQueue {
             queue: ~exclusive(~[])
diff --git a/src/libstd/rt/work_queue.rs b/src/libstd/rt/work_queue.rs
index cfffc55a58c..00d27744268 100644
--- a/src/libstd/rt/work_queue.rs
+++ b/src/libstd/rt/work_queue.rs
@@ -13,7 +13,7 @@ use option::*;
 use vec::OwnedVector;
 use unstable::sync::{Exclusive, exclusive};
 use cell::Cell;
-use kinds::Owned;
+use kinds::Send;
 use clone::Clone;
 
 pub struct WorkQueue<T> {
@@ -21,7 +21,7 @@ pub struct WorkQueue<T> {
     priv queue: ~Exclusive<~[T]>
 }
 
-impl<T: Owned> WorkQueue<T> {
+impl<T: Send> WorkQueue<T> {
     pub fn new() -> WorkQueue<T> {
         WorkQueue {
             queue: ~exclusive(~[])