Skip to content

Commit 0a00fab

Browse files
committed
Fix task-comm-15 type errors and un-xfail.
1 parent eb368d1 commit 0a00fab

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/test/run-pass/task-comm-15.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
// xfail-stage1
2-
// xfail-stage2
3-
// xfail-stage3
4-
51
use std;
62
import std::comm;
73
import std::task;
84

9-
fn start(c : comm::_chan<int>, n: int) {
5+
fn start(c : comm::chan<int>, n: int) {
106
let i: int = n;
117

128
while i > 0 { comm::send(c, 0); i = i - 1; }
139
}
1410

1511
fn main() {
16-
let p = comm::mk_port::<comm::_chan<int>>();
12+
let p = comm::mk_port();
1713
// Spawn a task that sends us back messages. The parent task
1814
// is likely to terminate before the child completes, so from
1915
// the child's point of view the receiver may die. We should
2016
// drop messages on the floor in this case, and not crash!
21-
let child = task::_spawn(bind start(p.mk_chan(), 10));
17+
let child = task::spawn(bind start(p.mk_chan(), 10));
2218
let c = p.recv();
2319
}

0 commit comments

Comments
 (0)