2024-02-16 20:02:50 +00:00
|
|
|
//@ build-pass
|
|
|
|
|
//@ compile-flags: --edition 2018
|
|
|
|
|
//@ compile-flags: --crate-type rlib
|
2021-04-28 10:18:52 -04:00
|
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
|
|
async fn handle<F>(slf: &F)
|
|
|
|
|
where
|
|
|
|
|
F: Fn(&()) -> Box<dyn for<'a> Future<Output = ()> + Unpin>,
|
|
|
|
|
{
|
|
|
|
|
(slf)(&()).await;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|