Re: [PATCH v4 6/6] rust: bitfield: Use 'as' operator for setter type conversion

Miguel Ojeda
2025-09-29T15:17:40Z

On Mon, Sep 29, 2025 at 4:45 PM Alexandre Courbot <acourbot@nvidia.com> wrote:
>
> A bit radical maybe, but correcness ensues. :)

I am all for Ada/Pascal-like ranges and similar ones as long as we can
make them ergonomic enough with our current Rust and as long as we
still define newtypes over those when appropriate.

Rust may get support for that eventually too (called pattern types),
but we may want to do our own thing meanwhile, just like `Alignment`.

Cheers,
Miguel