]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/newtype-struct-with-dtor.rs
Change finalize -> drop.
[rust.git] / src / test / run-pass / newtype-struct-with-dtor.rs
1 use std::libc::c_int;
2 use std::libc;
3
4 pub struct Fd(c_int);
5
6 impl Drop for Fd {
7     fn drop(&self) {
8         unsafe {
9             libc::close(**self);
10         }
11     }
12 }
13
14 pub fn main() {
15 }