Sign in
rust
/
rust-lang
/
rust
/
refs/heads/try-perf
/
.
/
tests
/
ui
/
nll
/
issue-52663-span-decl-captured-variable.rs
blob: 19a08472c0aaa2017eff11fc97a84d85ca742971 [
file
] [
log
] [
blame
] [
edit
]
//@ edition:2015..2021
fn
expect_fn
<
F
>(
f
:
F
)
where F
:
Fn
()
{
f
();
}
fn
main
()
{
{
let
x
=
(
vec
![
22
],
vec
![
44
]);
expect_fn
(||
drop
(
x
.
0
));
//~^ ERROR cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure [E0507]
}
}