Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Life<'a> {
- word: &'a str
- }
- fn test_life() {
- let my: Life;
- let mut words = "hi".to_string();
- my = Life { word: &words };
- drop(my);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement