mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00

Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
13 lines
208 B
Rust
13 lines
208 B
Rust
//@ 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()));
|
|
}
|