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

13 lines
249 B
Rust
Raw Normal View History

// Reported as issue #126, child leaks the string.
// pretty-expanded FIXME #23616
// ignore-emscripten no threads support
use std::thread;
fn child2(_s: String) { }
2013-05-07 23:33:31 -05:00
pub fn main() {
let _x = thread::spawn(move|| child2("hi".to_string()));
2013-05-07 23:33:31 -05:00
}