You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect dm_ioctl to have a #[derive(Debug)]. I tested this generated struct in the Rust playground and it successfully derives Debug when the directive is added. Was this an intentional design decision or does this appear to be a bug? Default appears not to be implemented for some of the members of the struct so that part makes sense.
The text was updated successfully, but these errors were encountered:
(and the other 128-element array). In the past, Rust wouldn't allow to derive traits other than Copy on arrays of more than 32 elements, so bindgen had to deal with it. It seems with const generics that's fixed.
So we have can_derive_large_array in src/ir/analysis/derive.rs. We should add a rust feature to src/features.rs to the appropriate rust version, and then check that from can_derive_large_array. Other usages of RUST_DERIVE_IN_ARRAY_LIMIT should also be audited, but I'm pretty sure the can_derive_large_array change should be enough to fix your test-case.
Okay, thanks so much for the quick response! This isn't urgent because I can implement Debug by hand for now as it's only not being generated for that one struct, but I just wanted to make sure that I wasn't missing some configuration.
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
I would expect
dm_ioctl
to have a#[derive(Debug)]
. I tested this generated struct in the Rust playground and it successfully derives Debug when the directive is added. Was this an intentional design decision or does this appear to be a bug?Default
appears not to be implemented for some of the members of the struct so that part makes sense.The text was updated successfully, but these errors were encountered: