We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class VirtualMethods { virtual void foo(); }; template<typename K> class Set { int bar; }; class ServoElementSnapshotTable : public Set<VirtualMethods> {};
$ bindgen input.h
/* automatically generated by rust-bindgen */ #[repr(C)] pub struct VirtualMethods__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] pub struct VirtualMethods { pub vtable_: *const VirtualMethods__bindgen_vtable, } #[test] fn bindgen_test_layout_VirtualMethods() { assert_eq!(::std::mem::size_of::<VirtualMethods>() , 8usize , concat ! ( "Size of: " , stringify ! ( VirtualMethods ) )); assert_eq! (::std::mem::align_of::<VirtualMethods>() , 8usize , concat ! ( "Alignment of " , stringify ! ( VirtualMethods ) )); } impl Clone for VirtualMethods { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct Set { pub bar: ::std::os::raw::c_int, } #[repr(C)] pub struct ServoElementSnapshotTable__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] pub struct ServoElementSnapshotTable { pub vtable_: *const ServoElementSnapshotTable__bindgen_vtable, pub _base: Set, } #[test] fn bindgen_test_layout_ServoElementSnapshotTable() { assert_eq!(::std::mem::size_of::<ServoElementSnapshotTable>() , 4usize , concat ! ( "Size of: " , stringify ! ( ServoElementSnapshotTable ) )); assert_eq! (::std::mem::align_of::<ServoElementSnapshotTable>() , 4usize , concat ! ( "Alignment of " , stringify ! ( ServoElementSnapshotTable ) )); } impl Clone for ServoElementSnapshotTable { fn clone(&self) -> Self { *self } } #[test] fn __bindgen_test_layout_Set_instantiation_13() { assert_eq!(::std::mem::size_of::<Set>() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( Set ) )); assert_eq!(::std::mem::align_of::<Set>() , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( Set ) )); }
ServoElementSnapshotTable should have no vtable
ServoElementSnapshotTable
The text was updated successfully, but these errors were encountered:
Auto merge of #692 - emilio:virtual-template-params, r=fitzgen
2d88dd1
ir: Don't assume template instantiation argument with vtable implies vtable Fixes #691
No branches or pull requests
Input C/C++ Header
Bindgen Invokation
Actual Results
Expected Results
ServoElementSnapshotTable
should have no vtableThe text was updated successfully, but these errors were encountered: