SHARE
TWEET

Untitled

a guest May 19th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #![feature(async_await, await_macro, existential_type)]
  2.  
  3. use std::future::Future;
  4.  
  5. async fn foo(_: &u8) {}
  6.  
  7. pub existential type ServeFut: Future<Output=()>;
  8.  
  9. fn bar() -> ServeFut {
  10.     async move {
  11.         let x = 5;
  12.         await!(foo(&x))
  13.     }
  14. }
  15.  
  16. fn main() {}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top