Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #![feature(unboxed_closures)]
  2.  
  3. use std::future::Future;
  4.  
  5. fn foo<F, S>(_: F)
  6. where
  7. F: for<'a> FnMut<(&'a mut S,)>,
  8. for<'a> <F as FnOnce<(&'a mut S,)>>::Output: Future<Output = ()>,
  9. {}
  10. async fn bar(x: &mut i32) {
  11.  
  12. }
  13.  
  14. fn main() {
  15. foo(bar);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement