rust/tests/ui/async-await/async-closures/debuginfo-by-move-body.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
322 B
Rust
Raw Normal View History

//@ aux-build:block-on.rs
//@ edition: 2021
//@ build-pass
//@ compile-flags: -Cdebuginfo=2
extern crate block_on;
2024-11-04 18:59:57 +00:00
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;
});
}