code generator: do not add field to `deducible_fields` if it is external
@@ -4554,6 +4554,11 @@ fn gather_deducible_fields(fields: &[xcbdefs::FieldDef]) -> FxHashMap<String, De
};
if let Some((field_name, deducible_field)) = deducible_field {
+ let is_not_ext_param = fields
+ .iter()
+ .any(|field| field.name() == Some(field_name.as_str()));
+
+ if is_not_ext_param {
match deducible_fields.entry(field_name) {
HashMapEntry::Occupied(_) => {
// field used more than once,
@@ -4566,6 +4571,7 @@ fn gather_deducible_fields(fields: &[xcbdefs::FieldDef]) -> FxHashMap<String, De
}
}
}
+ }
deducible_fields
}
