Sign in
fuchsia
/
third_party
/
rust
/
9ae1a664f7b947dadb9e97eea7703831d9cd5d31
/
.
/
src
/
test
/
ui
/
moves
/
moves-based-on-type-move-out-of-closure-env-issue-1965.rs
blob: 5fcd3392d33e379b11f649076bc58fa2356de487 [
file
] [
log
] [
blame
]
#![
feature
(
box_syntax
,
unboxed_closures
)]
use
std
::
usize
;
fn
to_fn
<
A
,
F
:
Fn
<
A
>>(
f
:
F
)
->
F
{
f
}
fn
test
(
_x
:
Box
<
usize
>)
{}
fn
main
()
{
let
i
=
box
3
;
let
_f
=
to_fn
(||
test
(
i
));
//~ ERROR cannot move out
}