Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. fn main() {
  2. let mut s = String::from("hello world");
  3. let letter = s.get(0..1).unwrap();
  4. // this is dropped on the spot
  5. s.get(0..1).unwrap();
  6. s.clear();
  7. // letter dropped here NLL or not
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement