summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/auxiliary/issue-3012-1.rs
blob: 509af2a8d7df355380d528299c9c4d853d19b9ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
        }
    }
}