mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
26 lines
369 B
Rust
26 lines
369 B
Rust
//@ run-pass
|
|
#![allow(dead_code)]
|
|
#![allow(non_camel_case_types)]
|
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
struct cat {
|
|
done : extern "C" fn(usize),
|
|
meows : usize,
|
|
}
|
|
|
|
impl Drop for cat {
|
|
fn drop(&mut self) {
|
|
(self.done)(self.meows);
|
|
}
|
|
}
|
|
|
|
fn cat(done: extern "C" fn(usize)) -> cat {
|
|
cat {
|
|
meows: 0,
|
|
done: done
|
|
}
|
|
}
|
|
|
|
pub fn main() {}
|