]> git.proxmox.com Git - rustc.git/blob - src/test/ui/threads-sendsync/child-outlives-parent.rs
New upstream version 1.58.1+dfsg1
[rustc.git] / src / test / ui / threads-sendsync / 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 }