mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 03:27:44 +00:00
13 lines
295 B
Rust
13 lines
295 B
Rust
![]() |
//@ edition:2018
|
||
|
//@ revisions: current next
|
||
|
//@[next] compile-flags: -Znext-solver
|
||
|
//@ check-pass
|
||
|
|
||
|
#![feature(async_closure, unboxed_closures, async_fn_traits)]
|
||
|
|
||
|
fn project<F: async Fn<()>>(_: F) -> Option<F::Output> { None }
|
||
|
|
||
|
fn main() {
|
||
|
let x: Option<i32> = project(|| async { 1i32 });
|
||
|
}
|