summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/derive-custom-cli.h
diff options
context:
space:
mode:
authorDan Dumont <dan.dumont@hcl.com>2023-01-20 15:12:42 -0500
committerGitHub <noreply@github.com>2023-01-20 15:12:42 -0500
commitbca47cd9c2e718012f7f953be25bb3a6a9ca400b (patch)
tree432dc9180f96a0365c9c49f73158a26f51e727d1 /bindgen-tests/tests/headers/derive-custom-cli.h
parent190a017a100b00aeebe2c5e5acfd5ee699a655c9 (diff)
Implement cli option for custom derive (#2328)
* custom derives after DeriveInfo * Introduce `TypeKind` instead of `CompKind` * Add tests * Emit CLI flags for callbacks * update changelog * run rustfmt * fix tests * fix features Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
Diffstat (limited to 'bindgen-tests/tests/headers/derive-custom-cli.h')
-rw-r--r--bindgen-tests/tests/headers/derive-custom-cli.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/bindgen-tests/tests/headers/derive-custom-cli.h b/bindgen-tests/tests/headers/derive-custom-cli.h
new file mode 100644
index 00000000..9b65536f
--- /dev/null
+++ b/bindgen-tests/tests/headers/derive-custom-cli.h
@@ -0,0 +1,14 @@
+// bindgen-flags: --default-enum-style rust --default-non-copy-union-style manually_drop --no-default=".*" --no-hash=".*" --no-partialeq=".*" --no-debug=".*" --no-copy=".*" --with-derive-custom="foo_[^e].*=Clone" --with-derive-custom-struct="foo.*=Default" --with-derive-custom-enum="foo.*=Copy" --with-derive-custom-union="foo.*=Copy"
+struct foo_struct {
+ int inner;
+};
+enum foo_enum {
+ inner = 0
+};
+union foo_union {
+ int fst;
+ float snd;
+};
+struct non_matching {
+ int inner;
+};