Guest User

Untitled

a guest
Apr 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. use std::fmt::Debug;
  2.  
  3. #[derive(Debug, Clone)]
  4. struct StructA;
  5.  
  6. impl Drop for StructA {
  7. fn drop(&mut self) {
  8. println!("Dropping.!")
  9. }
  10. }
  11.  
  12. fn main() {
  13. let _a = StructA{};
  14. println!("Ending Scope.?");
  15. /* ... 'a' can be borrowed here ... */
  16. let _a = StructA{};
  17. }
Add Comment
Please, Sign In to add comment