Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
threads-sendsync
/
child-outlives-parent.rs
blob: e965bac5713cecc0c35bbbaf577152eb14eec300 [
file
] [
log
] [
blame
] [
edit
]
//@ 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
()));
}