diff options
Diffstat (limited to 'vendor/countme/examples/print_at_exit.rs')
-rw-r--r-- | vendor/countme/examples/print_at_exit.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/countme/examples/print_at_exit.rs b/vendor/countme/examples/print_at_exit.rs new file mode 100644 index 000000000..fd51e2288 --- /dev/null +++ b/vendor/countme/examples/print_at_exit.rs @@ -0,0 +1,11 @@ +#[derive(Default)] +struct Widget { + _t: countme::Count<Self>, +} + +fn main() { + let w1 = Widget::default(); + let _w2 = Widget::default(); + drop(w1); + let _w3 = Widget::default(); +} |