Robbepop / modular-bitfield

Macro to generate bitfields for structs that allow for modular use of enums.
Apache License 2.0
159 stars 41 forks source link

Re-expand attributes on bitfields for expanded getters and setters #45

Closed Robbepop closed 3 years ago

Robbepop commented 3 years ago

Currently when attaching non-bitfield specific attributes onto fields of a #[bitfield] annotated struct they are simply lost. This is bad since users might want to have a direct influence onto some generated setters and getters. An example use case might be to add some specific documentation or disable certain warnings but there might be more!

This issue proposes to re-expand non-bitfield specific attributes for a given field for all expanded getters and setters of it. In the future we might want to provide the user with more control and take over control for which getters and setters the attribute shall be expanded but this issue is not concerned about this.