-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider synthetic closure bodies to be typeck children
- Loading branch information
1 parent
5fe0e40
commit 63405fc
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/ui/async-await/async-closures/debuginfo-by-move-body.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//@ aux-build:block-on.rs | ||
//@ edition: 2021 | ||
//@ build-pass | ||
//@ compile-flags: -Cdebuginfo=2 | ||
|
||
#![feature(async_closure)] | ||
|
||
extern crate block_on; | ||
|
||
async fn call_once(f: impl async FnOnce()) { | ||
f().await; | ||
} | ||
|
||
pub fn main() { | ||
block_on::block_on(async { | ||
let async_closure = async move || {}; | ||
call_once(async_closure).await; | ||
}); | ||
} |