Re: [PATCH] rust: num: bounded: add safety comment for Bounded::__new
From: Miguel Ojeda
Date: Mon Dec 01 2025 - 11:06:07 EST
On Mon, Dec 1, 2025 at 2:35 PM Hsiu Che Yu
<yu.whisper.personal@xxxxxxxxx> wrote:
>
> I previously believed that a function should only be marked unsafe when
> it directly operates on unsafe code. I now understand that the decision
> should be based on the actual safety implications rather than just
> semantic considerations.
>
> Thank you also for the clarification on the tags. I spent some time
> trying to understand them, and your explanation is very helpful.
>
> I will address this in v2 by making it an `unsafe fn` and documenting
> the safety requirements in the `# Safety` section.
My pleasure, and welcome to the Linux kernel!
Cheers,
Miguel