]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/spawn-types.rs
port over the tests to use the new API
[rust.git] / src / test / run-pass / spawn-types.rs
index fe6ea6374b13b81726fc456628b3cee5ac0deb0c..727d8326b4ea28f8fe53164ead9629c1a2f9e6c6 100644 (file)
 
 type ctx = comm::chan<int>;
 
-fn iotask(&&args: (ctx, str)) {
-    let (cx, ip) = args;
+fn iotask(cx: ctx, ip: str) {
     assert (str::eq(ip, "localhost"));
 }
 
 fn main() {
     let p = comm::port::<int>();
-    task::spawn((comm::chan(p), "localhost"), iotask);
+    let ch = comm::chan(p);
+    task::spawn {|| iotask(ch, "localhost"); };
 }