mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
15 lines
251 B
Rust
15 lines
251 B
Rust
//@ build-pass
|
|
//@ compile-flags: --edition 2018
|
|
//@ compile-flags: --crate-type rlib
|
|
|
|
use std::future::Future;
|
|
|
|
async fn handle<F>(slf: &F)
|
|
where
|
|
F: Fn(&()) -> Box<dyn for<'a> Future<Output = ()> + Unpin>,
|
|
{
|
|
(slf)(&()).await;
|
|
}
|
|
|
|
fn main() {}
|