mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
26 lines
367 B
Rust
26 lines
367 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() {}
|