blob: e396df4e5d119ce7c236d3fa82731525858e7bb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// edition:2021
// check-pass
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
use std::future::Future;
pub trait Pool {
type Conn;
async fn async_callback<'a, F: FnOnce(&'a Self::Conn) -> Fut, Fut: Future<Output = ()>>(
&'a self,
callback: F,
) -> ();
}
pub struct PoolImpl;
pub struct ConnImpl;
impl Pool for PoolImpl {
type Conn = ConnImpl;
async fn async_callback<'a, F: FnOnce(&'a Self::Conn) -> Fut, Fut: Future<Output = ()>>(
&'a self,
_callback: F,
) -> () {
todo!()
}
}
fn main() {}
|