]> git.lizzy.rs Git - rust.git/blob - src/test/ui/structs-enums/class-dtor.rs
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / structs-enums / class-dtor.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_camel_case_types)]
4
5 // pretty-expanded FIXME #23616
6
7 struct cat {
8   done : extern "C" fn(usize),
9   meows : usize,
10 }
11
12 impl Drop for cat {
13     fn drop(&mut self) {
14         (self.done)(self.meows);
15     }
16 }
17
18 fn cat(done: extern "C" fn(usize)) -> cat {
19     cat {
20         meows: 0,
21         done: done
22     }
23 }
24
25 pub fn main() {}