Re: [PATCH v8 07/12] rust: sizes: implement SizeConstants for Alignment
From: Eliot Courtney
Date: Fri Aug 28 2026 - 01:24:10 EST
On Fri Aug 28, 2026 at 2:13 PM JST, Alexandre Courbot wrote:
> 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`?
Was trying to show the context for the motivation for this change
(verbosity). But I can remove this if this is not how you use 'Link:'.
>
>> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
>
> Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>