SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct Wrap(u32);
  2. impl Drop for Wrap {
  3.     fn drop(&mut self) {
  4.         println!("hi, {} is being dropped", self.0);
  5.     }
  6. }
  7.  
  8. fn main() {
  9.     let w = Wrap(0);
  10.     let w2 = Wrap(1);
  11.     let w = Wrap(2);
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top