]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-2487-a.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-2487-a.rs
CommitLineData
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 7struct socket {
c34b1796 8 sock: isize,
223e47cc
LB
9
10}
11
12impl Drop for socket {
1a4d82fc 13 fn drop(&mut self) {}
223e47cc
LB
14}
15
970d7e83
LB
16impl socket {
17 pub fn set_identity(&self) {
1a4d82fc 18 closure(|| setsockopt_bytes(self.sock.clone()))
223e47cc
LB
19 }
20}
21
22fn socket() -> socket {
23 socket {
24 sock: 1
25 }
26}
27
1a4d82fc 28fn closure<F>(f: F) where F: FnOnce() { f() }
223e47cc 29
c34b1796 30fn setsockopt_bytes(_sock: isize) { }
223e47cc
LB
31
32pub fn main() {}