Sign in
fuchsia
/
third_party
/
rust
/
346aec9b02f3c74f3fce97fd6bda24709d220e49
/
.
/
src
/
test
/
ui
/
functions-closures
/
fn-bare-spawn.rs
blob: 0d46fe220876a4336ffa75195d76a093e0f8432c [
file
] [
log
] [
blame
]
// run-pass
// This is what the signature to spawn should look like with bare functions
fn
spawn
<
T
:
Send
>(
val
:
T
,
f
:
fn
(
T
))
{
f
(
val
);
}
fn
f
(
i
:
isize
)
{
assert_eq
!(
i
,
100
);
}
pub
fn
main
()
{
spawn
(
100
,
f
);
}