rust/src/test/run-pass/issue-2487-a.rs
2012-09-06 10:52:26 -07:00

24 lines
301 B
Rust

struct socket {
let sock: int;
drop { }
fn set_identity() {
do closure {
setsockopt_bytes(copy self.sock)
}
}
}
fn socket() -> socket {
socket {
sock: 1
}
}
fn closure(f: fn()) { f() }
fn setsockopt_bytes(_sock: int) { }
fn main() {}