Re: [PATCH] rust: num: Add inline annotation to Bounded methods
From: Alexandre Courbot
Date: Mon Oct 19 2026 - 12:51:43 EST
On Mon Oct 19, 2026 at 11:51 PM JST, Yury Norov wrote:
> On Mon, Oct 19, 2026 at 12:57:38PM +0200, 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>
>
> Reviewed-by: Yury Norov <ynorov@xxxxxxxxxx>
>
> Do you want me to take the patch with the bitops branch, or you've
> a better route in mind?
So far all the patches touching the `bounded` module have been merged
through the rust tree.