blob: e28cbee214e1a3d4f78e82f24957ef0733474c45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// check-pass
// edition:2021
use core::future::Future;
fn main() {
do_async(async { (0,) }, {
// closure must be inside block
|info| println!("{:?}", info.0)
});
}
fn do_async<R, Fut, F>(_tokio_fut: Fut, _glib_closure: F)
where
Fut: Future<Output = R>,
F: FnOnce(R),
{
}
|