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/dyn-pos.rs | |
| parent | 0eb2adb7e877ceaa7d4919f7b881508ee507ec3b (diff) | |
| download | rust-cd2fd34ca68f701ade233a980093ee4444f7da3a.tar.gz rust-cd2fd34ca68f701ade233a980093ee4444f7da3a.zip | |
Add tests
Diffstat (limited to 'tests/ui/async-await/async-fn/dyn-pos.rs')
| -rw-r--r-- | tests/ui/async-await/async-fn/dyn-pos.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-fn/dyn-pos.rs b/tests/ui/async-await/async-fn/dyn-pos.rs new file mode 100644 index 00000000000..3201fb8dbf3 --- /dev/null +++ b/tests/ui/async-await/async-fn/dyn-pos.rs @@ -0,0 +1,14 @@ +// edition:2018 + +#![feature(async_closure)] + +fn foo(x: &dyn async Fn()) {} +//~^ ERROR the trait `AsyncFn` cannot be made into an object +//~| ERROR the trait `AsyncFn` cannot be made into an object +//~| ERROR the trait `AsyncFn` cannot be made into an object +//~| ERROR the trait `AsyncFn` cannot be made into an object +//~| ERROR the trait `AsyncFnMut` cannot be made into an object +//~| ERROR the trait `AsyncFnMut` cannot be made into an object +//~| ERROR the trait `AsyncFnMut` cannot be made into an object + +fn main() {} |
