Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. fn main() {
  2. let f = |x, y| x + y;
  3.  
  4. let boxed_f: Box<dyn Fn(i32, i32) -> i32 + Send + Sync> = Box::new(f);
  5.  
  6. requires_send_and_sync(boxed_f);
  7. }
  8.  
  9. fn requires_send_and_sync<F: Send + Sync>(f: F) {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement