Re: [PATCH v2] rust: impl_flags: use bit helper in example

From: Miguel Ojeda

Date: Mon Aug 10 2026 - 00:57:10 EST


On Sat, Jul 11, 2026 at 10:23 AM Kosumi Chan <chankocyo@xxxxxxxxx> wrote:
>
> Use bit_u32() instead of open-coding shifts in the impl_flags! example.
> This demonstrates the checked bit helper and ensures that bit positions
> remain within the underlying u32 type.
>
> Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
> Link: https://github.com/Rust-for-Linux/linux/issues/1244
> Assisted-by: OpenCode:openai/gpt-5.6-sol
> Signed-off-by: Kosumi Chan <chankocyo@xxxxxxxxx>

Applied to `rust-next` -- thanks everyone!

Cheers,
Miguel