Advertisement
kalabukdima

Rust error message

Sep 14th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. error[E0597]: `x` does not live long enough
  2. --> src/main.rs:62:14
  3. |
  4. 62 | r = &x;
  5. | ^ borrowed value does not live long enough
  6. 63 | }
  7. | - `x` dropped here while still borrowed
  8. 64 | assert_eq!(*r, 0);
  9. 65 | }
  10. | - borrowed value needs to live until here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement