Re: [PATCH v15 3/3] rust: platform: add resource accessors
From: Miguel Ojeda
Date: Sat Jul 19 2025 - 12:20:20 EST
On Sat, Jul 19, 2025 at 3:15 PM Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> @Miguel: What's the preferred way dealing with this? I assume we just want to
> ignore this warning for the affected compiler versions?
Yeah, we had this in the past -- when I introduced the lint, I just
went with putting in the middle, e.g. in `rust/kernel/sync/lock.rs`'s
`do_unlocked`.
It has been fairly confusing, because long ago AFAIU it was not
intended to be supported, but then they introduced a config option for
it, and then it was made the default, but there were false positives.
It seems it has been finally fixed in
https://github.com/rust-lang/rust-clippy/pull/13888 for Rust 1.87.0.
I would say just put it in the middle. The only advantage of using an
`allow` would be using the "reason" field to say we can move it >=
1.87, but if we really want to move it, we can always use a normal
comment to say so instead.
Cheers,
Miguel