Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(async_await, futures_api)]
- use std::future::Future;
- fn check<A, B, F, R>(f: F)
- where
- F: FnOnce(A) -> R,
- R: Future<Output = B>,
- {}
- fn main() {
- let fut = async move |x: i32| x * x;
- check(fut);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement