Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Wrap(u32);
- impl Drop for Wrap {
- fn drop(&mut self) {
- println!("hi, {} is being dropped", self.0);
- }
- }
- fn main() {
- let w = Wrap(0);
- let w2 = Wrap(1);
- let w = Wrap(2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement