blob: fd6e0c4630d6f9854c5f5c4d7431b5aa62182a00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//@ run-pass
// Reported as issue #126, child leaks the string.
//@ needs-threads
use std::thread;
fn child2(_s: String) {}
pub fn main() {
let _x = thread::spawn(move || child2("hi".to_string()));
}
|