Open
Description
Currently our config looks a bit like this:
cfg.skip_field(move |struct_, field| {
(struct_ == "siginfo_t" && field == "_pad") ||
(musl && struct_ == "glob_t" && field == "gl_flags") ||
// ...
});
A problem is that we have no validation that e.g. _pad
actually exists in siginfo_t
. It would be better to have something like the following:
cfg.skip_field(&[
// format: `(struct, field, extra_condition)`
("siginfo_t", "_pad", true),
("glob_t", "gl_flags", musl),
])
This would skip if any any of the entries match struct and field, and the condition for that row is true. However, it could also warn if any of those items are never used meaning the struct or field don't exist.