Re: [PATCH v9] rust: transmute: Add methods for FromBytes trait
From: Alexandre Courbot
Date: Fri Aug 22 2025 - 09:54:20 EST
On Fri Aug 22, 2025 at 5:07 PM JST, Miguel Ojeda wrote:
> On Fri, Aug 22, 2025 at 5:10 AM Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>>
>> The methods making use of this feature are definitely usable by other
>> crates, and can also be inlined by the compiler. Would that be a
>> problem?
>
> No, that is fine.
Strangely though, even after enabling the feature, I am still occasionally getting this warning:
CLIPPY L rust/kernel.o
warning: current MSRV (Minimum Supported Rust Version) is `1.78.0` but this item is stable since `1.79.0`
--> rust/kernel/transmute.rs:39:45
|
39 | if bytes.len() == size && slice_ptr.is_aligned() {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
= note: `-W clippy::incompatible-msrv` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::incompatible_msrv)]`
warning: current MSRV (Minimum Supported Rust Version) is `1.78.0` but this item is stable since `1.79.0`
--> rust/kernel/transmute.rs:57:45
|
57 | if bytes.len() == size && slice_ptr.is_aligned() {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
warning: 2 warnings emitted