--with-derive-custom-struct doesn't apply to __BindgenBitfieldUnit · Issue #3196 · rust-lang/rust-bindgen (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@y86-dev

Description

@y86-dev

Invoking bindgen with --with-derive-custom-struct .*=Foo does not add #[derive(Foo)] to __BindgenBitfieldUnit.

I'd like all structs (& unions) to be marked with the derive macro, as it only implements the trait when all fields also implement it.

My current solution is to just manually implement the trait for __BindgenBitfieldUnit, which is fine, but not stable when you decide to rework how bitfields are represented.