Re: [PATCH v8 07/12] rust: sizes: implement SizeConstants for Alignment
From: Alexandre Courbot
Date: Fri Aug 28 2026 - 01:13:28 EST
On Thu Aug 27, 2026 at 4:28 PM JST, Eliot Courtney wrote:
> Currently, constructing an alignment is quite verbose:
>
> `Alignment::new::<8>()`
>
> It's unfortunate because it disincentivizes using it at interface
> boundaries. Implement `SizeConstants` for `Alignment` so we can write
> e.g. `Alignment::SZ_8` instead.
>
> Link: https://lore.kernel.org/an4xDp29VX8Am0uR@yury
What's the context for the link? Is this a `Suggested-by`?
> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>