Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Debug)] struct S(i32);
- impl Drop for S { fn drop (self: &'_ mut Self) {
- println!("{}", self.0);
- }}
- fn main() {
- const C: S = S(0);
- dbg!(C);
- C.0 = 123;
- dbg!(C);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement