PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
1// Reported as issue #126, child leaks the string.
2
3use std;
4import task;
5
6fn child2(&&s: ~str) { }
7
8fn main() { let x = task::spawn(|| child2(~"hi") ); }