Re: [PATCH] rust: alloc: allow coercion from `Box` to `Box` if T implements U

Alexandre Courbot
2025-04-11T12:01:07Z

On Tue Apr 8, 2025 at 10:58 PM JST, Miguel Ojeda wrote:
> On Tue, Apr 8, 2025 at 3:19 PM Alexandre Courbot <acourbot@nvidia.com> wrote:
>>
>> Apologies for that, I had no idea how to build using a specific
>> toolchain and did the wrong thing, which is sending without proper
>> testing.
>
> No worries at all! It is completely normal :)
>
>> I had some trouble finding how to 1) find out the minimum supported Rust
>> version, and 2) how to build using a specific toolchain.
>
> For 1), the minimum versions for tools the Linux kernel uses is documented at:
>
> https://docs.kernel.org/process/changes.html#current-minimal-requirements
>
> `min-tool-version.sh` is also fine, of course.
>
> For 2), similarly, it works like for other tools: either you override
> your binary in the `$PATH` (that is easy with Rust with the command
> you mention or simply with `rustup default X`), or you provide other
> binaries via e.g. `make RUSTC=...` like you would do with `make
> CC=...`.
>
>> I can send a patch against the Coding Guidelines adding a section to
>> encourage testing against the minimum version and explain how to force a
>> specific Rust version if you can confirm this would be helpful (and that
>> min-tool-version.sh is the correct way to check the minimum supported
>> Rust version).
>
> So that sort of thing is supposed to be documented in the "Submit
> Checklist Addendum" section of the "Maintainer Entry Profile" document
> (`P:` field in `MAINTAINERS`) of a given subsystem, and in particular
> for Rust is at:
>
> https://rust-for-linux.com/contributing#submit-checklist-addendum
>
> I agree that linking from the Coding Guidelines or perhaps the root of
> the Rust docs would probably help others to find it, since different
> people go to different places when starting, so please feel free to
> send a patch!

Mmm upon reading this section again I agree it contains the needed
information (even mentions `min-tool-version.sh`!) and can be found at
the expected place, so I indeed don't see what more could be added to
it. Thanks for the pointer and sorry again for overlooking!