Re: [PATCH] rust: num: Add inline annotation to Bounded methods
From: Alexandre Courbot
Date: Mon Oct 19 2026 - 11:45:51 EST
On Mon Oct 19, 2026 at 7:57 PM JST, Link Mauve wrote:
> It was previously generating a ton of very short functions, such as
> <<kernel::num::bounded::Bounded<u32, 32>>::shr::<17, 15>> or
> <<kernel::num::bounded::Bounded<u16, 16>>::new::<16384>> on use.
>
> These are obviously better inlined, although I wasn’t completely sure
> between #[inline] and #[inline(always)], but the former worked fine in
> my setup so I went for it, we can always adjust it later.
>
> Signed-off-by: Link Mauve <linkmauve@xxxxxxxxxxxx>
As Alice pointed out, `#[inline]` is the correct one here. Thanks for
fixing this!
Acked-by: Alexandre Courbot <acourbot@xxxxxxxxxx>