-
Notifications
You must be signed in to change notification settings - Fork 758
Closed
Labels
Description
When
https://github.com/servo/rust-bindgen/blob/4ac39de18b96bd9488a17cf2650994a3584d440c/libbindgen/src/codegen/mod.rs#L1092
this inserts new field into a struct definition, Debug or Clone is not removed if the bindgen_union_field is too large.
This is the generated code. (without unstable rust)
#[repr(C)] #[derive(Debug, Copy)] pub struct rte_thash_tuple { pub v4: __BindgenUnionField<rte_ipv4_tuple>, pub v6: __BindgenUnionField<rte_ipv6_tuple>, pub bindgen_union_field: [u8; 48usize], } impl Clone for rte_thash_tuple { fn clone(&self) -> Self { *self } }
I think can_derive_debug should be checked later or
inserted attribute should be removed later.