summary refs log tree commit diff
path: root/tests/ui/async-await/async-fn/dyn-pos.rs
blob: e817a1b518f37287e99b493d1e3c733d2bc630d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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() {}