Guest User

Untitled

a guest
Jun 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. #![allow(unused)]
  2. fn main() {
  3. let mut x = A {inner: "bar"};
  4.  
  5. foo(&mut x);
  6. foo(&mut x);
  7. }
  8.  
  9. struct A<'a> {
  10. inner: &'a str,
  11. }
  12.  
  13. fn foo<'a, 'b: 'a>(p: &'b mut A<'b>)-> &'a str {
  14. p.inner
  15. }
Add Comment
Please, Sign In to add comment