Files
rust/tests/ui/threads-sendsync/child-outlives-parent.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
208 B
Rust
Raw Normal View History

//@ run-pass
// Reported as issue #126, child leaks the string.
//@ needs-threads
use std::thread;
fn child2(_s: String) {}
2013-05-07 21:33:31 -07:00
pub fn main() {
let _x = thread::spawn(move || child2("hi".to_string()));
2013-05-07 21:33:31 -07:00
}