rust/src/test/compile-fail/issue-2487-b.rs
2012-07-04 17:21:29 -07:00

20 lines
298 B
Rust

class socket {
let sock: int;
new() { self.sock = 1; }
drop { }
fn set_identity() {
do closure {
setsockopt_bytes(self.sock) //~ ERROR copying a noncopyable value
}
}
}
fn closure(f: fn@()) { f() }
fn setsockopt_bytes(+_sock: int) { }
fn main() {}