3 #![allow(non_upper_case_globals)]
5 struct CustomAutoRooterVFTable {
6 trace: unsafe extern "C" fn(this: *mut i32, trc: *mut u32),
9 unsafe trait CustomAutoTraceable: Sized {
10 const vftable: CustomAutoRooterVFTable = CustomAutoRooterVFTable {
14 unsafe extern "C" fn trace(this: *mut i32, trc: *mut u32) {
15 let this = this as *const Self;
16 let this = this.as_ref().unwrap();
17 Self::do_trace(this, trc);
20 fn do_trace(&self, trc: *mut u32);
23 unsafe impl CustomAutoTraceable for () {
24 fn do_trace(&self, _: *mut u32) {
30 let _ = <()>::vftable;