diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-3012-1.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-3012-1.rs b/src/test/ui/issues/auxiliary/issue-3012-1.rs new file mode 100644 index 000000000..509af2a8d --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-3012-1.rs @@ -0,0 +1,20 @@ +#![crate_name="socketlib"] +#![crate_type = "lib"] + +pub mod socket { + pub struct socket_handle { + sockfd: u32, + } + + impl Drop for socket_handle { + fn drop(&mut self) { + /* c::close(self.sockfd); */ + } + } + + pub fn socket_handle(x: u32) -> socket_handle { + socket_handle { + sockfd: x + } + } +} |