summaryrefslogtreecommitdiff
path: root/libbindgen/tests/expectations/tests/struct_with_packing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libbindgen/tests/expectations/tests/struct_with_packing.rs')
-rw-r--r--libbindgen/tests/expectations/tests/struct_with_packing.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/libbindgen/tests/expectations/tests/struct_with_packing.rs b/libbindgen/tests/expectations/tests/struct_with_packing.rs
new file mode 100644
index 00000000..93fc3f11
--- /dev/null
+++ b/libbindgen/tests/expectations/tests/struct_with_packing.rs
@@ -0,0 +1,20 @@
+/* automatically generated by rust-bindgen */
+
+
+#![allow(non_snake_case)]
+
+
+#[repr(C, packed)]
+#[derive(Debug, Copy)]
+pub struct a {
+ pub b: ::std::os::raw::c_char,
+ pub c: ::std::os::raw::c_short,
+}
+#[test]
+fn bindgen_test_layout_a() {
+ assert_eq!(::std::mem::size_of::<a>() , 3usize);
+ assert_eq!(::std::mem::align_of::<a>() , 1usize);
+}
+impl Clone for a {
+ fn clone(&self) -> Self { *self }
+}