]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/chan-leak.rs
port over the tests to use the new API
[rust.git] / src / test / run-pass / chan-leak.rs
index 171947050d80822632da717561cf81cd12fba618..f7adb1a0961dd531ba741c0a42a6f45827c60418 100644 (file)
@@ -23,7 +23,8 @@ fn request_task(c: chan<ctx>) {
 
 fn new() -> ctx {
     let p = port();
-    let t = task::spawn(chan(p), request_task);
+    let ch = chan(p);
+    let t = task::spawn {|| request_task(ch); };
     let cx: ctx;
     cx = recv(p);
     ret cx;