Re: [PATCH 1/2] rust: sizes: add u64 variants of SZ_* constants

From: Miguel Ojeda

Date: Tue Mar 10 2026 - 16:24:07 EST


On Tue, Mar 10, 2026 at 2:51 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> Regarding adding the constants or not, I am ambivalent. On one hand, I
> see the pain of repeating it; on the other hand, adding these only
> works for particular values (i.e. we still need the safe casts around
> anyway for other values).

I see both Daniel and Danilo would like to have them, so that is a
strong indicator we likely want them. Thanks both for the replies!

Whether we go for `u64::` or not, please feel free to add:

Acked-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Either way, please consider the suggestion about using `const fn` in
the definitions here -- or if you prefer, we can put it as a "good
first issue" for a separate future improvement.

Thanks!

Cheers,
Miguel