rust/tests/ui/issues/issue-2487-a.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
468 B
Rust
Raw Normal View History

// build-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
2012-08-16 01:46:55 +00:00
struct socket {
sock: isize,
}
impl Drop for socket {
2013-09-17 01:18:07 +00:00
fn drop(&mut self) {}
}
impl socket {
pub fn set_identity(&self) {
closure(|| setsockopt_bytes(self.sock.clone()))
}
}
2012-09-05 22:58:43 +00:00
fn socket() -> socket {
socket {
sock: 1
}
}
2015-01-02 22:32:54 +00:00
fn closure<F>(f: F) where F: FnOnce() { f() }
fn setsockopt_bytes(_sock: isize) { }
pub fn main() {}