Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
async-await
/
async-closures
/
move-consuming-capture.rs
blob: c833bc7e895954b5e66048790a9cc51c12d8ca41 [
file
] [
log
] [
blame
]
//@ aux-build:block-on.rs
//@ edition:2021
extern
crate block_on
;
struct
NoCopy
;
fn
main
()
{
block_on
::
block_on
(
async
{
let
s
=
NoCopy
;
let
x
=
async
move
||
{
drop
(
s
);
};
x
().
await
;
x
().
await
;
//~^ ERROR use of moved value: `x`
});
}