Skip to content

Commit 9b9fc33

Browse files
committed
Rehabilitate run-fail/linked-failure4.rs
1 parent b2dd5f5 commit 9b9fc33

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/test/run-fail/linked-failure4.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
// -*- rust -*-
22
// error-pattern:1 == 2
3-
// xfail-test Been deadlocking on mac
43
use std;
54
import std::task;
65
import std::comm::chan;
76
import std::comm::port;
87
import std::comm::recv;
98

10-
fn child() { assert (1 == 2); }
9+
fn child(&&_args: ()) { assert (1 == 2); }
1110

12-
fn parent() {
11+
fn parent(&&_args: ()) {
1312
let p = port::<int>();
14-
let f = child;
15-
task::spawn(f);
13+
task::spawn((), child);
1614
let x = recv(p);
1715
}
1816

1917
// This task is not linked to the failure chain, but since the other
2018
// tasks are going to fail the kernel, this one will fail too
21-
fn sleeper() {
19+
fn sleeper(&&_args: ()) {
2220
let p = port::<int>();
2321
let x = recv(p);
2422
}
2523

2624
fn main() {
27-
let g = sleeper;
28-
task::spawn(g);
29-
let f = parent;
30-
task::spawn(f);
25+
task::spawn((), sleeper);
26+
task::spawn((), parent);
3127
}

0 commit comments

Comments
 (0)