summary refs log tree commit diff
path: root/src/test/run-fail
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-08-15 16:54:02 -0700
committerEric Holk <eholk@mozilla.com>2011-08-16 09:36:29 -0700
commitcf2def46c120d8d6ef8a98571a39bef478c8c2a9 (patch)
tree902078db51847e2c3badb941dcbceeb5216d866f /src/test/run-fail
parente33af7e0b505de6d7c754d2ead26c9ee2bc8974e (diff)
downloadrust-cf2def46c120d8d6ef8a98571a39bef478c8c2a9.tar.gz
rust-cf2def46c120d8d6ef8a98571a39bef478c8c2a9.zip
Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library.
Diffstat (limited to 'src/test/run-fail')
-rw-r--r--src/test/run-fail/linked-failure.rs5
-rw-r--r--src/test/run-fail/port-type.rs18
2 files changed, 14 insertions, 9 deletions
diff --git a/src/test/run-fail/linked-failure.rs b/src/test/run-fail/linked-failure.rs
index f7932c93a27..4fbb0d1498b 100644
--- a/src/test/run-fail/linked-failure.rs
+++ b/src/test/run-fail/linked-failure.rs
@@ -5,11 +5,12 @@
 
 use std;
 import std::task;
+import std::comm::mk_port;
 
 fn child() { assert (1 == 2); }
 
 fn main() {
-    let p: port[int] = port();
+    let p = mk_port[int]();
     task::_spawn(bind child());
-    let x: int; p |> x;
+    let x = p.recv();
 }
diff --git a/src/test/run-fail/port-type.rs b/src/test/run-fail/port-type.rs
index cadb8ef387d..bacb7f9effc 100644
--- a/src/test/run-fail/port-type.rs
+++ b/src/test/run-fail/port-type.rs
@@ -1,13 +1,17 @@
 // error-pattern:meep
-fn echo[T](c: chan[T], oc: chan[chan[T]]) {
+use std;
+import std::comm::_chan;
+import std::comm::mk_port;
+import std::comm::send;
+
+fn echo[~T](c: _chan[T], oc: _chan[_chan[T]]) {
     // Tests that the type argument in port gets
     // visited
-    let p = port[T]();
-    oc <| chan(p);
+    let p = mk_port[T]();
+    send(oc, p.mk_chan());
 
-    let x;
-    p |> x;
-    c <| x;
+    let x = p.recv();
+    send(c, x);
 }
 
-fn main() { fail "meep"; }
\ No newline at end of file
+fn main() { fail "meep"; }