Guest User

Untitled

a guest
May 20th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. fn bar1<'a>(x: &'a mut [i32]) -> impl Fn() -> &'a mut i32 {
  2. || &mut x[0]
  3. }
  4.  
  5. struct Foo<'a>(&'a mut i32);
  6.  
  7. fn bar2<'a>(x: &'a mut [i32]) -> Foo<'a> {
  8. Foo(&mut x[0])
  9. }
  10.  
  11. fn bar3<'a>(x: &'a mut [i32]) -> &'a mut i32 {
  12. &mut x[0]
  13. }
Add Comment
Please, Sign In to add comment