rust/src/test/run-pass/child-outlives-parent.rs

8 lines
142 B
Rust
Raw Normal View History

// Reported as issue #126, child leaks the string.
use std;
fn child2(&&s: ~str) { }
fn main() { let x = task::spawn(|| child2(~"hi") ); }