diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs index c298213fb7c..f01bf890191 100644 --- a/src/libcore/pipes.rs +++ b/src/libcore/pipes.rs @@ -978,10 +978,10 @@ pub enum Port { These allow sending or receiving an unlimited number of messages. */ -pub fn stream() -> (Chan, Port) { +pub fn stream() -> (Port, Chan) { let (c, s) = streamp::init(); - (Chan_({ mut endp: Some(move c) }), Port_({ mut endp: Some(move s) })) + (Port_({ mut endp: Some(move s) }), Chan_({ mut endp: Some(move c) })) } impl Chan: GenericChan { @@ -1070,7 +1070,7 @@ impl PortSet { } fn chan() -> Chan { - let (ch, po) = stream(); + let (po, ch) = stream(); self.add(move po); move ch } @@ -1240,8 +1240,8 @@ pub mod rt { pub mod test { #[test] pub fn test_select2() { - let (c1, p1) = pipes::stream(); - let (c2, p2) = pipes::stream(); + let (p1, c1) = pipes::stream(); + let (p2, c2) = pipes::stream(); c1.send(~"abc"); @@ -1264,7 +1264,7 @@ pub mod test { #[test] fn test_peek_terminated() { - let (chan, port): (Chan, Port) = stream(); + let (port, chan): (Port, Chan) = stream(); { // Destroy the channel diff --git a/src/libcore/private.rs b/src/libcore/private.rs index 2b6156b14c4..bc85dcbbbf8 100644 --- a/src/libcore/private.rs +++ b/src/libcore/private.rs @@ -576,7 +576,7 @@ pub mod tests { for uint::range(0, num_tasks) |_i| { let total = total.clone(); - let (chan, port) = pipes::stream(); + let (port, chan) = pipes::stream(); futures.push(move port); do task::spawn |move total, move chan| { diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs index 188b7c33467..98da3f50318 100644 --- a/src/libcore/task/mod.rs +++ b/src/libcore/task/mod.rs @@ -340,7 +340,7 @@ impl TaskBuilder { } // Construct the future and give it to the caller. - let (notify_pipe_ch, notify_pipe_po) = stream::(); + let (notify_pipe_po, notify_pipe_ch) = stream::(); blk(move notify_pipe_po); @@ -1211,7 +1211,7 @@ fn test_unkillable() { #[ignore(cfg(windows))] #[should_fail] fn test_unkillable_nested() { - let (ch, po) = pipes::stream(); + let (po, ch) = pipes::stream(); // We want to do this after failing do spawn_unlinked |move ch| { @@ -1277,7 +1277,7 @@ fn test_child_doesnt_ref_parent() { #[test] fn test_sched_thread_per_core() { - let (chan, port) = pipes::stream(); + let (port, chan) = pipes::stream(); do spawn_sched(ThreadPerCore) |move chan| { let cores = rt::rust_num_threads(); @@ -1291,7 +1291,7 @@ fn test_sched_thread_per_core() { #[test] fn test_spawn_thread_on_demand() { - let (chan, port) = pipes::stream(); + let (port, chan) = pipes::stream(); do spawn_sched(ManualThreads(2)) |move chan| { let max_threads = rt::rust_sched_threads(); @@ -1299,7 +1299,7 @@ fn test_spawn_thread_on_demand() { let running_threads = rt::rust_sched_current_nonlazy_threads(); assert(running_threads as int == 1); - let (chan2, port2) = pipes::stream(); + let (port2, chan2) = pipes::stream(); do spawn() |move chan2| { chan2.send(()); diff --git a/src/libcore/task/spawn.rs b/src/libcore/task/spawn.rs index 05f775d08d4..61e358e1e30 100644 --- a/src/libcore/task/spawn.rs +++ b/src/libcore/task/spawn.rs @@ -670,7 +670,7 @@ fn test_spawn_raw_unsupervise() { #[test] #[ignore(cfg(windows))] fn test_spawn_raw_notify_success() { - let (notify_ch, notify_po) = pipes::stream(); + let (notify_po, notify_ch) = pipes::stream(); let opts = { notify_chan: Some(move notify_ch), @@ -685,7 +685,7 @@ fn test_spawn_raw_notify_success() { #[ignore(cfg(windows))] fn test_spawn_raw_notify_failure() { // New bindings for these - let (notify_ch, notify_po) = pipes::stream(); + let (notify_po, notify_ch) = pipes::stream(); let opts = { linked: false, diff --git a/src/librustdoc/markdown_writer.rs b/src/librustdoc/markdown_writer.rs index ae4fa5f42c2..0f03e7f4594 100644 --- a/src/librustdoc/markdown_writer.rs +++ b/src/librustdoc/markdown_writer.rs @@ -111,12 +111,12 @@ fn pandoc_writer( os::close(pipe_err.out); os::close(pipe_in.out); - let (stdout_ch, stdout_po) = pipes::stream(); + let (stdout_po, stdout_ch) = pipes::stream(); do task::spawn_sched(task::SingleThreaded) |move stdout_ch| { stdout_ch.send(readclose(pipe_out.in)); } - let (stderr_ch, stderr_po) = pipes::stream(); + let (stderr_po, stderr_ch) = pipes::stream(); do task::spawn_sched(task::SingleThreaded) |move stderr_ch| { stderr_ch.send(readclose(pipe_err.in)); } @@ -149,7 +149,7 @@ fn readclose(fd: libc::c_int) -> ~str { } fn generic_writer(+process: fn~(+markdown: ~str)) -> Writer { - let (setup_ch, setup_po) = pipes::stream(); + let (setup_po, setup_ch) = pipes::stream(); do task::spawn |move process, move setup_ch| { let po: comm::Port = comm::Port(); let ch = comm::Chan(&po); @@ -279,7 +279,7 @@ pub fn future_writer_factory( let markdown_po = comm::Port(); let markdown_ch = comm::Chan(&markdown_po); let writer_factory = fn~(+page: doc::Page) -> Writer { - let (writer_ch, writer_po) = pipes::stream(); + let (writer_po, writer_ch) = pipes::stream(); do task::spawn |move writer_ch| { let (writer, future) = future_writer(); writer_ch.send(move writer); @@ -293,7 +293,7 @@ pub fn future_writer_factory( } fn future_writer() -> (Writer, future::Future<~str>) { - let (chan, port) = pipes::stream(); + let (port, chan) = pipes::stream(); let writer = fn~(move chan, +instr: WriteInstr) { chan.send(copy instr); }; diff --git a/src/libstd/arc.rs b/src/libstd/arc.rs index 05acbeab9e5..eacb310ee02 100644 --- a/src/libstd/arc.rs +++ b/src/libstd/arc.rs @@ -471,7 +471,7 @@ mod tests { let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; let arc_v = arc::ARC(v); - let (c, p) = pipes::stream(); + let (p, c) = pipes::stream(); do task::spawn() |move c| { let p = pipes::PortSet(); @@ -517,7 +517,7 @@ mod tests { fn test_arc_condvar_poison() { let arc = ~MutexARC(1); let arc2 = ~arc.clone(); - let (c,p) = pipes::stream(); + let (p, c) = pipes::stream(); do task::spawn_unlinked |move arc2, move p| { let _ = p.recv(); @@ -551,7 +551,7 @@ mod tests { fn test_mutex_arc_unwrap_poison() { let arc = MutexARC(1); let arc2 = ~(&arc).clone(); - let (c,p) = pipes::stream(); + let (p, c) = pipes::stream(); do task::spawn |move c, move arc2| { do arc2.access |one| { c.send(()); @@ -649,7 +649,7 @@ mod tests { fn test_rw_arc() { let arc = ~RWARC(0); let arc2 = ~arc.clone(); - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); do task::spawn |move arc2, move c| { do arc2.write |num| { @@ -695,7 +695,7 @@ mod tests { // Reader tasks let mut reader_convos = ~[]; for 10.times { - let ((rc1,rp1),(rc2,rp2)) = (pipes::stream(),pipes::stream()); + let ((rp1,rc1),(rp2,rc2)) = (pipes::stream(),pipes::stream()); reader_convos.push((move rc1, move rp2)); let arcn = ~arc.clone(); do task::spawn |move rp1, move rc2, move arcn| { @@ -709,7 +709,7 @@ mod tests { // Writer task let arc2 = ~arc.clone(); - let ((wc1,wp1),(wc2,wp2)) = (pipes::stream(),pipes::stream()); + let ((wp1,wc1),(wp2,wc2)) = (pipes::stream(),pipes::stream()); do task::spawn |move arc2, move wc2, move wp1| { wp1.recv(); do arc2.write_cond |state, cond| { diff --git a/src/libstd/comm.rs b/src/libstd/comm.rs index d8c5b6e5944..49c5df2a28e 100644 --- a/src/libstd/comm.rs +++ b/src/libstd/comm.rs @@ -64,8 +64,8 @@ impl DuplexStream : Selectable { pub fn DuplexStream() -> (DuplexStream, DuplexStream) { - let (c2, p1) = pipes::stream(); - let (c1, p2) = pipes::stream(); + let (p1, c2) = pipes::stream(); + let (p2, c1) = pipes::stream(); (DuplexStream { chan: move c1, port: move p1 diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index a373a201ffe..7506f1ea7bd 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -34,7 +34,7 @@ struct Waitqueue { head: pipes::Port, tail: pipes::Chan } fn new_waitqueue() -> Waitqueue { - let (block_tail, block_head) = pipes::stream(); + let (block_head, block_tail) = pipes::stream(); Waitqueue { head: move block_head, tail: move block_tail } } @@ -733,7 +733,7 @@ mod tests { #[test] fn test_sem_as_cvar() { /* Child waits and parent signals */ - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let s = ~semaphore(0); let s2 = ~s.clone(); do task::spawn |move s2, move c| { @@ -745,7 +745,7 @@ mod tests { let _ = p.recv(); /* Parent waits and child signals */ - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let s = ~semaphore(0); let s2 = ~s.clone(); do task::spawn |move s2, move p| { @@ -762,8 +762,8 @@ mod tests { // time, and shake hands. let s = ~semaphore(2); let s2 = ~s.clone(); - let (c1,p1) = pipes::stream(); - let (c2,p2) = pipes::stream(); + let (p1,c1) = pipes::stream(); + let (p2,c2) = pipes::stream(); do task::spawn |move s2, move c1, move p2| { do s2.access { let _ = p2.recv(); @@ -782,7 +782,7 @@ mod tests { do task::spawn_sched(task::ManualThreads(1)) { let s = ~semaphore(1); let s2 = ~s.clone(); - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let child_data = ~mut Some((move s2, move c)); do s.access { let (s2,c) = option::swap_unwrap(child_data); @@ -804,7 +804,7 @@ mod tests { fn test_mutex_lock() { // Unsafely achieve shared state, and do the textbook // "load tmp = move ptr; inc tmp; store ptr <- tmp" dance. - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let m = ~Mutex(); let m2 = ~m.clone(); let mut sharedstate = ~0; @@ -847,7 +847,7 @@ mod tests { cond.wait(); } // Parent wakes up child - let (chan,port) = pipes::stream(); + let (port,chan) = pipes::stream(); let m3 = ~m.clone(); do task::spawn |move chan, move m3| { do m3.lock_cond |cond| { @@ -870,7 +870,7 @@ mod tests { for num_waiters.times { let mi = ~m.clone(); - let (chan, port) = pipes::stream(); + let (port, chan) = pipes::stream(); ports.push(move port); do task::spawn |move chan, move mi| { do mi.lock_cond |cond| { @@ -932,7 +932,7 @@ mod tests { let m2 = ~m.clone(); let result: result::Result<(),()> = do task::try |move m2| { - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); do task::spawn |move p| { // linked let _ = p.recv(); // wait for sibling to get in the mutex task::yield(); @@ -954,12 +954,12 @@ mod tests { fn test_mutex_killed_broadcast() { let m = ~Mutex(); let m2 = ~m.clone(); - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let result: result::Result<(),()> = do task::try |move c, move m2| { let mut sibling_convos = ~[]; for 2.times { - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let c = ~mut Some(move c); sibling_convos.push(move p); let mi = ~m2.clone(); @@ -1022,7 +1022,7 @@ mod tests { let result = do task::try { let m = ~mutex_with_condvars(2); let m2 = ~m.clone(); - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); do task::spawn |move m2, move c| { do m2.lock_cond |cond| { c.send(()); @@ -1082,7 +1082,7 @@ mod tests { mode2: RWlockMode) { // Test mutual exclusion between readers and writers. Just like the // mutex mutual exclusion test, a ways above. - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let x2 = ~x.clone(); let mut sharedstate = ~0; let ptr = ptr::addr_of(&(*sharedstate)); @@ -1127,8 +1127,8 @@ mod tests { mode2: RWlockMode, make_mode2_go_first: bool) { // Much like sem_multi_resource. let x2 = ~x.clone(); - let (c1,p1) = pipes::stream(); - let (c2,p2) = pipes::stream(); + let (p1,c1) = pipes::stream(); + let (p2,c2) = pipes::stream(); do task::spawn |move c1, move x2, move p2| { if !make_mode2_go_first { let _ = p2.recv(); // parent sends to us once it locks, or ... @@ -1193,7 +1193,7 @@ mod tests { cond.wait(); } // Parent wakes up child - let (chan,port) = pipes::stream(); + let (port,chan) = pipes::stream(); let x3 = ~x.clone(); do task::spawn |move x3, move chan| { do x3.write_cond |cond| { @@ -1229,7 +1229,7 @@ mod tests { for num_waiters.times { let xi = ~x.clone(); - let (chan, port) = pipes::stream(); + let (port, chan) = pipes::stream(); ports.push(move port); do task::spawn |move chan, move xi| { do lock_cond(xi, dg1) |cond| { diff --git a/src/libstd/task_pool.rs b/src/libstd/task_pool.rs index 938a3ffec0c..a87576789af 100644 --- a/src/libstd/task_pool.rs +++ b/src/libstd/task_pool.rs @@ -42,7 +42,7 @@ pub impl TaskPool { assert n_tasks >= 1; let channels = do vec::from_fn(n_tasks) |i| { - let (chan, port) = pipes::stream::>(); + let (port, chan) = pipes::stream::>(); let init_fn = init_fn_factory(); let task_body: ~fn() = |move port, move init_fn| { diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs index 05898393540..5b6c5210dbf 100644 --- a/src/test/bench/msgsend-pipes-shared.rs +++ b/src/test/bench/msgsend-pipes-shared.rs @@ -55,8 +55,8 @@ fn server(requests: Port, responses: pipes::Chan) { } fn run(args: &[~str]) { - let (to_parent, from_child) = pipes::stream(); - let (to_child, from_parent) = pipes::stream(); + let (from_child, to_parent) = pipes::stream(); + let (from_parent, to_child) = pipes::stream(); let to_child = SharedChan(move to_child); diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs index 0901d9ab8db..269d02ae45f 100644 --- a/src/test/bench/msgsend-pipes.rs +++ b/src/test/bench/msgsend-pipes.rs @@ -33,7 +33,7 @@ enum request { } fn server(requests: PortSet, responses: pipes::Chan) { - let mut count = 0u; + let mut count = 0; let mut done = false; while !done { match requests.try_recv() { @@ -51,8 +51,8 @@ fn server(requests: PortSet, responses: pipes::Chan) { } fn run(args: &[~str]) { - let (to_parent, from_child) = pipes::stream(); - let (to_child, from_parent_) = pipes::stream(); + let (from_child, to_parent) = pipes::stream(); + let (from_parent_, to_child) = pipes::stream(); let from_parent = PortSet(); from_parent.add(move from_parent_); @@ -62,7 +62,7 @@ fn run(args: &[~str]) { let start = std::time::precise_time_s(); let mut worker_results = ~[]; for uint::range(0, workers) |_i| { - let (to_child, from_parent_) = pipes::stream(); + let (from_parent_, to_child) = pipes::stream(); from_parent.add(move from_parent_); do task::task().future_result(|+r| { worker_results.push(move r); diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 040ecc56df3..83f9e77edc5 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -157,11 +157,11 @@ fn main() { let sz = *sz; let mut stream = None; stream <-> streams[ii]; - let (to_parent_, from_child_) = option::unwrap(move stream); + let (from_child_, to_parent_) = option::unwrap(move stream); from_child.push(move from_child_); - let (to_child, from_parent) = pipes::stream(); + let (from_parent, to_child) = pipes::stream(); do task::spawn_with(move from_parent) |move to_parent_, from_parent| { make_sequence_processor(sz, from_parent, to_parent_); diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs index 55a6211dcc8..c5429086c43 100644 --- a/src/test/bench/shootout-pfib.rs +++ b/src/test/bench/shootout-pfib.rs @@ -50,7 +50,7 @@ fn fib(n: int) -> int { } } - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); let _t = task::spawn(|move ch| pfib(ch, n) ); p.recv() } diff --git a/src/test/bench/task-perf-jargon-metal-smoke.rs b/src/test/bench/task-perf-jargon-metal-smoke.rs index 9e9a1ffbe5f..3d886e561a7 100644 --- a/src/test/bench/task-perf-jargon-metal-smoke.rs +++ b/src/test/bench/task-perf-jargon-metal-smoke.rs @@ -43,7 +43,7 @@ fn main() { copy args }; - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); child_generation(uint::from_str(args[1]).get(), move c); if p.try_recv().is_none() { fail ~"it happened when we slumbered"; diff --git a/src/test/compile-fail/bind-by-move-no-guards.rs b/src/test/compile-fail/bind-by-move-no-guards.rs index 3c9af823cb9..a5cc7ea10d7 100644 --- a/src/test/compile-fail/bind-by-move-no-guards.rs +++ b/src/test/compile-fail/bind-by-move-no-guards.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); let x = Some(p); c.send(false); match move x { diff --git a/src/test/run-pass/issue-3168.rs b/src/test/run-pass/issue-3168.rs index ac1c6553191..5caf5e05ab6 100644 --- a/src/test/run-pass/issue-3168.rs +++ b/src/test/run-pass/issue-3168.rs @@ -11,15 +11,15 @@ // xfail-fast fn main() { - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); do task::try |move c| { - let (c2,p2) = pipes::stream(); + let (p2,c2) = pipes::stream(); do task::spawn |move p2| { p2.recv(); error!("sibling fails"); fail; } - let (c3,p3) = pipes::stream(); + let (p3,c3) = pipes::stream(); c.send(move c3); c2.send(()); error!("child blocks"); diff --git a/src/test/run-pass/issue-3176.rs b/src/test/run-pass/issue-3176.rs index b94230ec865..817d4b9a375 100644 --- a/src/test/run-pass/issue-3176.rs +++ b/src/test/run-pass/issue-3176.rs @@ -13,19 +13,19 @@ use pipes::{Select2, Selectable}; fn main() { - let (c,p) = pipes::stream(); + let (p,c) = pipes::stream(); do task::try |move c| { - let (c2,p2) = pipes::stream(); + let (p2,c2) = pipes::stream(); do task::spawn |move p2| { p2.recv(); error!("sibling fails"); fail; } - let (c3,p3) = pipes::stream(); + let (p3,c3) = pipes::stream(); c.send(move c3); c2.send(()); error!("child blocks"); - let (c, p) = pipes::stream(); + let (p, c) = pipes::stream(); (move p, move p3).select(); c.send(()); }; diff --git a/src/test/run-pass/task-comm-0.rs b/src/test/run-pass/task-comm-0.rs index 535c05fb8bd..a473d631819 100644 --- a/src/test/run-pass/task-comm-0.rs +++ b/src/test/run-pass/task-comm-0.rs @@ -28,7 +28,7 @@ fn test05_start(ch : Chan) { } fn test05() { - let (ch, po) = pipes::stream(); + let (po, ch) = pipes::stream(); task::spawn(|move ch| test05_start(ch) ); let mut value = po.recv(); log(error, value); diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs index f41f272e0cf..5188ec7b71b 100644 --- a/src/test/run-pass/task-comm-10.rs +++ b/src/test/run-pass/task-comm-10.rs @@ -14,7 +14,7 @@ extern mod std; fn start(c: pipes::Chan>) { - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); c.send(move ch); let mut a; @@ -28,7 +28,7 @@ fn start(c: pipes::Chan>) { } fn main() { - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); let child = task::spawn(|move ch| start(ch) ); let c = p.recv(); diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs index 8df0d7df786..8d0a8a425b0 100644 --- a/src/test/run-pass/task-comm-11.rs +++ b/src/test/run-pass/task-comm-11.rs @@ -14,12 +14,12 @@ extern mod std; fn start(c: pipes::Chan>) { - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); c.send(move ch); } fn main() { - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); let child = task::spawn(|move ch| start(ch) ); let c = p.recv(); } diff --git a/src/test/run-pass/task-comm-13.rs b/src/test/run-pass/task-comm-13.rs index 94a68aefa71..89097776b90 100644 --- a/src/test/run-pass/task-comm-13.rs +++ b/src/test/run-pass/task-comm-13.rs @@ -21,7 +21,7 @@ fn start(c: pipes::Chan, start: int, number_of_messages: int) { fn main() { debug!("Check that we don't deadlock."); - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); task::try(|move ch| start(ch, 0, 10) ); debug!("Joined task"); } diff --git a/src/test/run-pass/task-comm-14.rs b/src/test/run-pass/task-comm-14.rs index dd1a3c940f1..62415ca438d 100644 --- a/src/test/run-pass/task-comm-14.rs +++ b/src/test/run-pass/task-comm-14.rs @@ -18,7 +18,7 @@ fn main() { let mut i = 10; while (i > 0) { log(debug, i); - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); po.add(move p); task::spawn(|move ch, copy i| child(i, ch) ); i = i - 1; diff --git a/src/test/run-pass/task-comm-15.rs b/src/test/run-pass/task-comm-15.rs index 58bb19e0087..d8a537f2c5c 100644 --- a/src/test/run-pass/task-comm-15.rs +++ b/src/test/run-pass/task-comm-15.rs @@ -27,7 +27,7 @@ fn main() { // is likely to terminate before the child completes, so from // the child's point of view the receiver may die. We should // drop messages on the floor in this case, and not crash! - let (ch, p) = pipes::stream(); + let (p, ch) = pipes::stream(); task::spawn(|move ch| start(ch, 10)); p.recv(); } diff --git a/src/test/run-pass/task-comm-16.rs b/src/test/run-pass/task-comm-16.rs index 67450c9b26b..dcfc6fed207 100644 --- a/src/test/run-pass/task-comm-16.rs +++ b/src/test/run-pass/task-comm-16.rs @@ -20,7 +20,7 @@ use pipes::Chan; fn test_rec() { type r = {val0: int, val1: u8, val2: char}; - let (ch, po) = pipes::stream(); + let (po, ch) = pipes::stream(); let r0: r = {val0: 0, val1: 1u8, val2: '2'}; ch.send(r0); let mut r1: r; @@ -31,7 +31,7 @@ fn test_rec() { } fn test_vec() { - let (ch, po) = pipes::stream(); + let (po, ch) = pipes::stream(); let v0: ~[int] = ~[0, 1, 2]; ch.send(v0); let v1 = po.recv(); @@ -41,7 +41,7 @@ fn test_vec() { } fn test_str() { - let (ch, po) = pipes::stream(); + let (po, ch) = pipes::stream(); let s0 = ~"test"; ch.send(s0); let s1 = po.recv(); @@ -85,7 +85,7 @@ impl t : cmp::Eq { } fn test_tag() { - let (ch, po) = pipes::stream(); + let (po, ch) = pipes::stream(); ch.send(tag1); ch.send(tag2(10)); ch.send(tag3(10, 11u8, 'A')); @@ -99,8 +99,8 @@ fn test_tag() { } fn test_chan() { - let (ch, po) = pipes::stream(); - let (ch0, po0) = pipes::stream(); + let (po, ch) = pipes::stream(); + let (po0, ch0) = pipes::stream(); ch.send(move ch0); let ch1 = po.recv(); // Does the transmitted channel still work? diff --git a/src/test/run-pass/task-comm-4.rs b/src/test/run-pass/task-comm-4.rs index 2cfb5a66346..3f42b4d5b57 100644 --- a/src/test/run-pass/task-comm-4.rs +++ b/src/test/run-pass/task-comm-4.rs @@ -16,7 +16,7 @@ fn main() { test00(); } fn test00() { let mut r: int = 0; let mut sum: int = 0; - let (c, p) = pipes::stream(); + let (p, c) = pipes::stream(); c.send(1); c.send(2); c.send(3); diff --git a/src/test/run-pass/task-comm-5.rs b/src/test/run-pass/task-comm-5.rs index 162819b6a00..dbf43df4069 100644 --- a/src/test/run-pass/task-comm-5.rs +++ b/src/test/run-pass/task-comm-5.rs @@ -15,7 +15,7 @@ fn main() { test00(); } fn test00() { let r: int = 0; let mut sum: int = 0; - let (c, p) = pipes::stream(); + let (p, c) = pipes::stream(); let number_of_messages: int = 1000; let mut i: int = 0; while i < number_of_messages { c.send(i + 0); i += 1; } diff --git a/src/test/run-pass/trivial-message.rs b/src/test/run-pass/trivial-message.rs index f7a083298be..e5bcba59ea2 100644 --- a/src/test/run-pass/trivial-message.rs +++ b/src/test/run-pass/trivial-message.rs @@ -15,7 +15,7 @@ use pipes::{Port, Chan}; message. */ fn main() { - let (ch, po) = pipes::stream(); + let (po, ch) = pipes::stream(); ch.send(42); let r = po.recv(); log(error, r);