-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
librustc: Fix bug with newtype structs containing dtors
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() { | ||
} | ||
|
||
|
9e26d16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from jld
at pcwalton@9e26d16
9e26d16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging pcwalton/rust/newtype-struct-with-dtor = 9e26d16 into auto
9e26d16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pcwalton/rust/newtype-struct-with-dtor = 9e26d16 merged ok, testing candidate = ebbd94f3
9e26d16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
http://buildbot.rust-lang.org/builders/auto-linux/builds/612
http://buildbot.rust-lang.org/builders/auto-win/builds/607