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
244 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)]
2024-11-04 18:59:57 +00:00
type Tait = impl AsyncFn();
2024-01-26 17:00:34 +00:00
fn tait() -> Tait {
|| async {}
}
2024-11-04 18:59:57 +00:00
fn foo(x: impl AsyncFn()) -> impl AsyncFn() { x }
2024-01-26 17:00:34 +00:00
2024-11-04 18:59:57 +00:00
fn param<T: AsyncFn()>() {}
2024-01-26 17:00:34 +00:00
fn main() {}