Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. struct Foo;
  2.  
  3. // works
  4. fn one<'a>() -> &'a Foo {
  5. let _reference : &'static Foo = &Foo;//is the lifetime of this borrow 'static or 'a ?
  6. _reference
  7. }
  8.  
  9. fn main() {
  10. one();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement