mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
12 lines
296 B
Rust
12 lines
296 B
Rust
//@ edition:2021
|
|
|
|
async fn clone_async_block(value: String) {
|
|
for _ in 0..10 {
|
|
async { //~ ERROR: use of moved value: `value` [E0382]
|
|
drop(value);
|
|
//~^ HELP: consider cloning the value if the performance cost is acceptable
|
|
}.await
|
|
}
|
|
}
|
|
fn main() {}
|