diff options
| author | Michael Goulet <michael@errs.io> | 2024-01-26 17:00:34 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-01-31 16:59:19 +0000 |
| commit | cd2fd34ca68f701ade233a980093ee4444f7da3a (patch) | |
| tree | 5a05b9c584df6a0b6eb284f1d4a6807ead9bdc34 /tests/ui/async-await/async-fn/impl-trait.rs | |
| parent | 0eb2adb7e877ceaa7d4919f7b881508ee507ec3b (diff) | |
| download | rust-cd2fd34ca68f701ade233a980093ee4444f7da3a.tar.gz rust-cd2fd34ca68f701ade233a980093ee4444f7da3a.zip | |
Add tests
Diffstat (limited to 'tests/ui/async-await/async-fn/impl-trait.rs')
| -rw-r--r-- | tests/ui/async-await/async-fn/impl-trait.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-fn/impl-trait.rs b/tests/ui/async-await/async-fn/impl-trait.rs new file mode 100644 index 00000000000..97f6696fe14 --- /dev/null +++ b/tests/ui/async-await/async-fn/impl-trait.rs @@ -0,0 +1,15 @@ +// 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() {} |
