2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
2010-08-03 12:20:29 -07:00
|
|
|
// Reported as issue #126, child leaks the string.
|
2011-08-13 15:20:11 -07:00
|
|
|
|
2024-03-06 12:19:20 -08:00
|
|
|
//@ needs-threads
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-03-30 11:00:05 -07:00
|
|
|
use std::thread;
|
2011-08-13 15:20:11 -07:00
|
|
|
|
2024-08-24 05:32:52 +02:00
|
|
|
fn child2(_s: String) {}
|
2010-08-03 12:20:29 -07:00
|
|
|
|
2013-05-07 21:33:31 -07:00
|
|
|
pub fn main() {
|
2024-08-24 05:32:52 +02:00
|
|
|
let _x = thread::spawn(move || child2("hi".to_string()));
|
2013-05-07 21:33:31 -07:00
|
|
|
}
|