Guest User

Untitled

a guest
Jul 18th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. struct Foo;
  2.  
  3. impl Foo {
  4. fn do_mut_stuff(&mut self) {}
  5.  
  6. fn do_immut_stuff(&self) {}
  7. }
  8.  
  9. fn run(mut really_long_name: Foo) {
  10. let alias = &mut really_long_name;
  11.  
  12. alias.do_mut_stuff();
  13. alias.do_immut_stuff();
  14. alias.do_mut_stuff();
  15. }
  16.  
  17. fn main() {}
Add Comment
Please, Sign In to add comment