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.

16 lines
360 B
Rust
Raw Normal View History

2024-02-26 23:06:38 +00:00
//@ edition:2018
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
2024-02-26 23:06:38 +00:00
//@[next] compile-flags: -Znext-solver
//@ check-pass
2024-11-06 17:53:59 +00:00
#![feature(unboxed_closures, async_fn_traits)]
2024-02-26 23:06:38 +00:00
2024-11-04 18:59:57 +00:00
use std::ops::AsyncFn;
fn project<F: AsyncFn<()>>(_: F) -> Option<F::Output> { None }
2024-02-26 23:06:38 +00:00
fn main() {
let x: Option<i32> = project(|| async { 1i32 });
}