blob: b2d8dbae977e436181647dc7168b29cff32eee7c (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
 | //@ 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() {}
 |