]> git.lizzy.rs Git - rust.git/blob - src/test/ui/child-outlives-parent.rs
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[rust.git] / src / test / ui / child-outlives-parent.rs
1 // run-pass
2 // Reported as issue #126, child leaks the string.
3
4 // pretty-expanded FIXME #23616
5 // ignore-emscripten no threads support
6
7 use std::thread;
8
9 fn child2(_s: String) { }
10
11 pub fn main() {
12     let _x = thread::spawn(move|| child2("hi".to_string()));
13 }