granite-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-15 18:46:55 -07:00
struct socket {
sock: isize,
}
impl Drop for socket {
2013-09-16 21:18:07 -04:00
fn drop(&mut self) {}
}
impl socket {
pub fn set_identity(&self) {
closure(|| setsockopt_bytes(self.sock.clone()))
}
}
2012-09-05 15:58:43 -07:00
fn socket() -> socket {
socket {
sock: 1
}
}
2015-01-02 17:32:54 -05:00
fn closure<F>(f: F) where F: FnOnce() { f() }
fn setsockopt_bytes(_sock: isize) { }
pub fn main() {}