]>
Commit | Line | Data |
---|---|---|
60c5eb7d | 1 | // build-pass |
0bf4aa26 | 2 | #![allow(dead_code)] |
b7449926 XL |
3 | #![allow(non_camel_case_types)] |
4 | ||
c34b1796 AL |
5 | // pretty-expanded FIXME #23616 |
6 | ||
223e47cc | 7 | struct socket { |
c34b1796 | 8 | sock: isize, |
223e47cc LB |
9 | |
10 | } | |
11 | ||
12 | impl Drop for socket { | |
1a4d82fc | 13 | fn drop(&mut self) {} |
223e47cc LB |
14 | } |
15 | ||
970d7e83 LB |
16 | impl socket { |
17 | pub fn set_identity(&self) { | |
1a4d82fc | 18 | closure(|| setsockopt_bytes(self.sock.clone())) |
223e47cc LB |
19 | } |
20 | } | |
21 | ||
22 | fn socket() -> socket { | |
23 | socket { | |
24 | sock: 1 | |
25 | } | |
26 | } | |
27 | ||
1a4d82fc | 28 | fn closure<F>(f: F) where F: FnOnce() { f() } |
223e47cc | 29 | |
c34b1796 | 30 | fn setsockopt_bytes(_sock: isize) { } |
223e47cc LB |
31 | |
32 | pub fn main() {} |