Advertisement
Guest User

Untitled

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