summaryrefslogtreecommitdiffstats
path: root/tests/ui/threads-sendsync/child-outlives-parent.rs
blob: e3a39a44bb82194194d6fe310972149f39e9a5cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
// Reported as issue #126, child leaks the string.

// pretty-expanded FIXME #23616
// ignore-emscripten no threads support

use std::thread;

fn child2(_s: String) { }

pub fn main() {
    let _x = thread::spawn(move|| child2("hi".to_string()));
}