mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
19 lines
306 B
Rust
19 lines
306 B
Rust
![]() |
//@ 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`
|
||
|
});
|
||
|
}
|