0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-28 09:36:05 +01:00
rust/tests/ui/threads-sendsync/child-outlives-parent.rs
2024-08-24 05:32:52 +02:00

14 lines
241 B
Rust

//@ run-pass
// Reported as issue #126, child leaks the string.
//@ pretty-expanded FIXME #23616
//@ needs-threads
use std::thread;
fn child2(_s: String) {}
pub fn main() {
let _x = thread::spawn(move || child2("hi".to_string()));
}