SHARE
TWEET

Untitled

a guest Jun 17th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn f<'a>(mut a : &'a mut char, mut b : &'a mut char) {
  2.     for x in vec![&mut a, &mut b] {
  3.         /*if x == 'a' {
  4.             *x = 'x';
  5.         }*/
  6.         println!("x: {:?}", x);
  7.     }
  8.     println!("a: {:?} b: {:?}", a, b);
  9. }
  10.  
  11. fn main() {
  12.     let mut a = 'a';
  13.     let mut b = 'b';
  14.     f(&mut a, &mut b);
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top