Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. struct Life<'a> {
  2. word: &'a str
  3. }
  4. fn test_life() {
  5. let my: Life;
  6. let mut words = "hi".to_string();
  7. my = Life { word: &words };
  8. drop(my);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement