rust/src/test/run-pass/issue-2487-a.rs

24 lines
301 B
Rust
Raw Normal View History

2012-08-15 20:46:55 -05:00
struct socket {
let sock: int;
drop { }
fn set_identity() {
do closure {
setsockopt_bytes(copy self.sock)
}
}
}
2012-09-05 17:58:43 -05:00
fn socket() -> socket {
socket {
sock: 1
}
}
fn closure(f: fn()) { f() }
fn setsockopt_bytes(_sock: int) { }
fn main() {}