Skip to content

Commit 687b4d9

Browse files
committed
Add regression test for #104678
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
1 parent 918d0ac commit 687b4d9

File tree

1 file changed

+31
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)