Skip to content

Commit 29ceb41

Browse files
committed
Update and un-XFAIL run-pass/many.rs
1 parent 4ff6763 commit 29ceb41

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/test/run-pass/many.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
// xfail-stage1
2-
// xfail-stage2
3-
// xfail-stage3
41
// -*- rust -*-
52

6-
fn sub(chan[int] parent, int id) {
3+
fn sub(parent: chan[int], id: int) {
74
if (id == 0) {
85
parent <| 0;
96
} else {
10-
let port[int] p = port();
11-
auto child = spawn sub(chan(p), id-1);
12-
let int y; p |> y;
7+
let p: port[int] = port();
8+
let child = spawn sub(chan(p), id-1);
9+
let y: int; p |> y;
1310
parent <| y + 1;
1411
}
1512
}
1613

1714
fn main() {
18-
let port[int] p = port();
19-
auto child = spawn sub(chan(p), 500);
20-
let int p |> y;
15+
let p: port[int] = port();
16+
let child = spawn sub(chan(p), 200);
17+
let y: int; p |> y;
2118
log "transmission complete";
2219
log y;
23-
assert (y == 500);
20+
assert (y == 200);
2421
}

0 commit comments

Comments
 (0)