Re: [PATCH 3/6] rust: add `bitfield!` macro

From: Miguel Ojeda

Date: Tue Jan 27 2026 - 05:57:15 EST


On Tue, Jan 27, 2026 at 11:41 AM Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>
> The closest we could get would be a macro, that would look like
>
> bitfield_set!(color, blue, 10);
>
> And beyond the scenes it would call some more intricate (and unsightly)
> machinery. I'd rather define the constraints clearly for users - they
> are not so drastic.

Yeah, our guideline has always been to avoid macros unless really needed.

Cheers,
Miguel