/src/test/run-pass/child-outlives-parent.rs
http://github.com/jruderman/rust · Rust · 8 lines · 4 code · 3 blank · 1 comment · 0 complexity · c65ca3ec6263fe6c67be0aa1a663d9ac MD5 · raw file
- // Reported as issue #126, child leaks the string.
- use std;
- import task;
- fn child2(&&s: ~str) { }
- fn main() { let x = task::spawn(|| child2(~"hi") ); }