Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Debug)]
- struct S(i32);
- impl S {
- fn disp(&self) {
- println!("S::disp() on {:?}", self);
- }
- }
- impl Drop for S {
- fn drop(&mut self) {
- println!("{:?} droped", self);
- }
- }
- static GL: S = S(3);
- fn main() {
- GL.disp();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement