Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let f = |x, y| x + y;
- let boxed_f: Box<dyn Fn(i32, i32) -> i32 + Send + Sync> = Box::new(f);
- requires_send_and_sync(boxed_f);
- }
- fn requires_send_and_sync<F: Send + Sync>(f: F) {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement