rust/src/test/run-fail/spawnfail.rs
Brian Anderson c337fd5467 Child tasks take a ref to their parents
This is so that when a child dies after the parent, it still holds a valid
pointer and can call supervisor->kill() safely.
2011-09-07 10:32:58 -07:00

14 lines
267 B
Rust

// Currently failure doesn't propagate correctly to owning tasks so xfailed
// xfail-test
// error-pattern:explicit
use std;
import std::task;
// We don't want to see any invalid reads
fn main() {
fn f() {
fail;
}
let g = f;
task::spawn(g);
}