diff options
Diffstat (limited to 'tests/expectations/tests/constructor-tp.rs')
-rw-r--r-- | tests/expectations/tests/constructor-tp.rs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/expectations/tests/constructor-tp.rs b/tests/expectations/tests/constructor-tp.rs new file mode 100644 index 00000000..50220489 --- /dev/null +++ b/tests/expectations/tests/constructor-tp.rs @@ -0,0 +1,37 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Foo<T> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Bar { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_Bar() { + assert_eq!(::std::mem::size_of::<Bar>() , 1usize); + assert_eq!(::std::mem::align_of::<Bar>() , 1usize); +} +extern "C" { + #[link_name = "_ZN3BarC1Ev"] + pub fn Bar_Bar(this: *mut Bar); +} +impl Clone for Bar { + fn clone(&self) -> Self { *self } +} +impl Bar { + #[inline] + pub unsafe fn new() -> Self { + let mut __bindgen_tmp = ::std::mem::uninitialized(); + Bar_Bar(&mut __bindgen_tmp); + __bindgen_tmp + } +} |