Re: [PATCH] rust/pin-init: remove workaround for type inference cycle
From: Benno Lossin
Date: Sun Jul 27 2025 - 13:58:49 EST
On Sun Jul 27, 2025 at 7:44 PM CEST, Suchit K wrote:
> On Sun, 27 Jul 2025 at 22:58, Benno Lossin <lossin@xxxxxxxxxx> wrote:
>> On Sun Jul 27, 2025 at 7:02 PM CEST, Suchit Karunakaran wrote:
>> > The `cast_pin_init` and `cast_init` functions previously used an
>> > intermediate `let` binding before returning the result expression to work
>> > around a Rust compiler issue causing type inference cycles. With the
>> > minimum Rust compiler version for the kernel now at 1.78.0, where this
>> > issue is fixed, the workaround is no longer needed. This patch removes the
>> > unnecessary `let` variables and returns the expressions directly.
>> >
>> > Signed-off-by: Suchit Karunakaran <suchitkarunakaran@xxxxxxxxx>
>>
>> I still encounter the cycle when compiling with 1.78.0, which version
>> did you test this with?
>>
>
> Oops, I just realised that I compiled it locally and forgot that I had
> installed version 1.78.0 on my VM and not on my local system. I
> actually compiled it with version 1.88.0. Sorry for the inconvenience.
No worries.
>> Do note the comment mentioning that it is needed for version 1.78 here,
>> so I think this patch still needs to wait until we bump the minimum.
>>
>
> Yup got it. I'll send the patch after the minimum version is
> increased. Thanks for reviewing.
If you do, then please send the patch upstream at [1], that makes things
easier for me, thanks!
[1]: https://github.com/rust-for-linux/pin-init
---
Cheers,
Benno