rust/tests/ui/async-await/async-fn/project.rs

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

13 lines
295 B
Rust
Raw Normal View History

2024-02-26 23:06:38 +00:00
//@ 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 });
}