Guest User

Untitled

a guest
Aug 15th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. fn foo<T, F, G>(x: &mut T, mut f: F, g: G)
  2. where
  3. F: FnMut(&T) -> &T,
  4. G: Fn(&T) -> &T,
  5. {
  6. {
  7. f(x);
  8. }
  9.  
  10. g(x);
  11. }
  12.  
  13. fn main() {
  14. let mut x = 5;
  15. foo(&mut x, |a| a, |a| a);
  16. }
Add Comment
Please, Sign In to add comment