2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2012-08-15 18:46:55 -07:00
|
|
|
struct cat {
|
2020-09-01 17:28:11 -04:00
|
|
|
done : extern "C" fn(usize),
|
2015-03-25 17:06:52 -07:00
|
|
|
meows : usize,
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|
|
|
|
|
2013-02-14 11:47:00 -08:00
|
|
|
impl Drop for cat {
|
2013-09-16 21:18:07 -04:00
|
|
|
fn drop(&mut self) {
|
2012-12-01 15:25:17 -08:00
|
|
|
(self.done)(self.meows);
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|
2012-05-14 14:13:32 -07:00
|
|
|
}
|
|
|
|
|
2020-09-01 17:28:11 -04:00
|
|
|
fn cat(done: extern "C" fn(usize)) -> cat {
|
2012-09-05 15:58:43 -07:00
|
|
|
cat {
|
2015-03-03 10:42:26 +02:00
|
|
|
meows: 0,
|
2012-09-05 15:58:43 -07:00
|
|
|
done: done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {}
|