librustc: Fix bug with newtype structs containing dtors

This commit is contained in:
Patrick Walton 2013-03-24 21:04:01 -07:00
parent a376f46862
commit 3b2fcf9f59
2 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,17 @@
use core::libc::c_int;
use core::libc;
pub struct Fd(c_int);
impl Drop for Fd {
fn finalize(&self) {
unsafe {
libc::close(**self);
}
}
}
fn main() {
}