rust/tests/ui/async-await/async-fn/impl-trait.rs

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

16 lines
248 B
Rust
Raw Normal View History

2024-01-26 17:00:34 +00:00
//@ edition:2018
//@ check-pass
#![feature(async_closure, type_alias_impl_trait)]
type Tait = impl async Fn();
fn tait() -> Tait {
|| async {}
}
fn foo(x: impl async Fn()) -> impl async Fn() { x }
fn param<T: async Fn()>() {}
fn main() {}