Re: [PATCH v3] rust: num: bounded: mark __new as unsafe
From: Miguel Ojeda
Date: Sun Jan 04 2026 - 16:11:51 EST
On Thu, Dec 4, 2025 at 4:39 AM Hsiu Che Yu
<yu.whisper.personal@xxxxxxxxx> wrote:
>
> /// The caller remains responsible for checking, either statically or dynamically, that `value`
> /// can be represented as a `T` using at most `N` bits.
I will apply this one, but I think this paragraph is not needed, i.e.
we can remove it, since now we added it as an actual precondition.
Also, it would be good to add back an `// INVARIANT:` comment, but
just once, inside `__new()`, when we construct `Self(value)`.
What do you think, Alexandre? All those can be done later.
Thanks!
Cheers,
Miguel