summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/no-derive-debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen-tests/tests/headers/no-derive-debug.h')
-rw-r--r--bindgen-tests/tests/headers/no-derive-debug.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/bindgen-tests/tests/headers/no-derive-debug.h b/bindgen-tests/tests/headers/no-derive-debug.h
new file mode 100644
index 00000000..d11ca0ad
--- /dev/null
+++ b/bindgen-tests/tests/headers/no-derive-debug.h
@@ -0,0 +1,15 @@
+// bindgen-flags: --no-derive-debug --blocklist-type foo --raw-line "#[repr(C)] #[derive(Copy, Clone, Default)] pub struct foo { bar: ::std::os::raw::c_int, }"
+
+struct foo {
+ int bar;
+};
+
+/**
+ * bar should compile. It will normally derive debug, but our blocklist of foo
+ * and replacement for another type that doesn't implement it would prevent it
+ * from building if --no-derive-debug didn't work.
+ */
+struct bar {
+ struct foo foo;
+ int baz;
+};