summaryrefslogtreecommitdiff
path: root/bindgen/codegen/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen/codegen/mod.rs')
-rw-r--r--bindgen/codegen/mod.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs
index c7ac59db..e758963a 100644
--- a/bindgen/codegen/mod.rs
+++ b/bindgen/codegen/mod.rs
@@ -2114,9 +2114,11 @@ impl CodeGenerator for CompInfo {
// The custom derives callback may return a list of derive attributes;
// add them to the end of the list.
- let custom_derives = ctx
- .options()
- .all_callbacks(|cb| cb.add_derives(&canonical_name));
+ let custom_derives = ctx.options().all_callbacks(|cb| {
+ cb.add_derives(&crate::callbacks::DeriveInfo {
+ name: &canonical_name,
+ })
+ });
// In most cases this will be a no-op, since custom_derives will be empty.
derives.extend(custom_derives.iter().map(|s| s.as_str()));
@@ -3168,8 +3170,9 @@ impl CodeGenerator for Enum {
// The custom derives callback may return a list of derive attributes;
// add them to the end of the list.
- let custom_derives =
- ctx.options().all_callbacks(|cb| cb.add_derives(&name));
+ let custom_derives = ctx.options().all_callbacks(|cb| {
+ cb.add_derives(&crate::callbacks::DeriveInfo { name: &name })
+ });
// In most cases this will be a no-op, since custom_derives will be empty.
derives.extend(custom_derives.iter().map(|s| s.as_str()));