Advertisement
Guest User

Untitled

a guest
May 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  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() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement