Re: [PATCH v4 6/6] rust: use strict provenance APIs
From: Benno Lossin
Date: Mon Mar 17 2025 - 11:01:20 EST
On Mon Mar 17, 2025 at 11:53 AM CET, Tamir Duberstein wrote:
> On Mon, Mar 17, 2025 at 5:34 AM Benno Lossin <benno.lossin@xxxxxxxxx> wrote:
>>
>> On Sat Mar 15, 2025 at 1:17 PM CET, Tamir Duberstein wrote:
>> > Throughout the tree, use the strict provenance APIs stabilized in Rust
>> > 1.84.0[1]. Retain backwards-compatibility by introducing forwarding
>> > functions at the `kernel` crate root along with polyfills for rustc <
>> > 1.84.0.
>> >
>> > Use `#[allow(clippy::incompatible_msrv)]` to avoid warnings on rustc <
>> > 1.84.0 as our MSRV is 1.78.0.
>>
>> This isn't necessary, right?
>
> It is necessary. MSRV is encoded in .clippy.toml, it doesn't matter
> what the *current* rustc version is.
Oh of course.
>> > In the `kernel` crate, enable the strict provenance lints on rustc >=
>> > 1.84.0; do this in `lib.rs` rather than `Makefile` to avoid introducing
>> > compiler flags that are dependent on the rustc version in use.
>>
>> So it won't be enabled in the doctests, right?
>
> Yes, that is correct.
I would mention this in the commit message. Thanks!
---
Cheers,
Benno