Sign in
fuchsia
/
third_party
/
rust
/
b3827e4f3728b77bd3e60587487ebfc3cc8d901b
/
.
/
tests
/
ui
/
borrowck
/
borrowck-move-moved-value-into-closure.rs
blob: 72e7b5a716273a4afaab55700ac192c357955d52 [
file
] [
log
] [
blame
]
fn
call_f
<
F
:
FnOnce
()
->
isize
>(
f
:
F
)
->
isize
{
f
()
}
fn
main
()
{
let
t
:
Box
<
_
>
=
Box
::
new
(
3
);
call_f
(
move
||
{
*
t
+
1
});
call_f
(
move
||
{
*
t
+
1
});
//~ ERROR use of moved value
}