about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/debuginfo-by-move-body.rs
blob: a1d6ce259e2317d192ad06997a8b1dae8df6b4b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ aux-build:block-on.rs
//@ edition: 2021
//@ build-pass
//@ compile-flags: -Cdebuginfo=2

extern crate block_on;

async fn call_once(f: impl AsyncFnOnce()) {
    f().await;
}

pub fn main() {
    block_on::block_on(async {
        let async_closure = async move || {};
        call_once(async_closure).await;
    });
}