diff --git a/src/test/run-pass/spawn-types.rs b/src/test/run-pass/spawn-types.rs index e99006273d53..6fb0b60ac5d5 100644 --- a/src/test/run-pass/spawn-types.rs +++ b/src/test/run-pass/spawn-types.rs @@ -7,9 +7,14 @@ use std; import std::str; +import std::comm; +import std::task; -type ctx = chan[int]; +type ctx = comm::chan_t[int]; fn iotask(cx: ctx, ip: str) { assert (str::eq(ip, "localhost")); } -fn main() { let p: port[int] = port(); spawn iotask(chan(p), "localhost"); } \ No newline at end of file +fn main() { + let p = comm::mk_port[int](); + task::_spawn(bind iotask(p.mk_chan2(), "localhost")); +} diff --git a/src/test/run-pass/spawn2.rs b/src/test/run-pass/spawn2.rs index a0488fafaba9..cbc53ad4a9df 100644 --- a/src/test/run-pass/spawn2.rs +++ b/src/test/run-pass/spawn2.rs @@ -1,6 +1,9 @@ // -*- rust -*- -fn main() { spawn child(10, 20, 30, 40, 50, 60, 70, 80, 90); } +use std; +import std::task::_spawn; + +fn main() { _spawn(bind child(10, 20, 30, 40, 50, 60, 70, 80, 90)); } fn child(i1: int, i2: int, i3: int, i4: int, i5: int, i6: int, i7: int, i8: int, i9: int) {