blob: 35c25c7f7267ca83a3e04772b3d89ae29f2f56c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//@ edition:2018
type AsyncFnPtr = Box<dyn Fn() -> std::pin::Pin<Box<dyn std::future::Future<Output = ()>>>>;
async fn test() {}
#[allow(unused_must_use)]
fn main() {
Box::new(test) as AsyncFnPtr;
//~^ ERROR expected `test` to return `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>
}
|