summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/derive-default-and-blocklist.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen-tests/tests/headers/derive-default-and-blocklist.hpp')
-rw-r--r--bindgen-tests/tests/headers/derive-default-and-blocklist.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/bindgen-tests/tests/headers/derive-default-and-blocklist.hpp b/bindgen-tests/tests/headers/derive-default-and-blocklist.hpp
new file mode 100644
index 00000000..20d938cc
--- /dev/null
+++ b/bindgen-tests/tests/headers/derive-default-and-blocklist.hpp
@@ -0,0 +1,14 @@
+// bindgen-flags: --blocklist-type BlocklistMe --raw-line 'pub struct BlocklistMe(u8);'
+
+// Note that we do not explicitly provide the `--with-derive-default` flag
+// above, since it is added by the test runner implicitly.
+
+struct BlocklistMe {};
+
+/**
+ * Because this type contains a blocklisted type, it should not derive
+ * Default. Instead, we should emit a `mem::zeroed` implementation.
+ */
+struct ShouldNotDeriveDefault {
+ BlocklistMe a;
+};