Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: remove unneeded Rust 1.87.0 `allow(clippy::ptr_eq)`

For the Rust 1.87.0 release, Clippy was expected to warn with:

error: use `core::ptr::eq` when comparing raw pointers
--> rust/kernel/list.rs:438:12
|
438 | if self.first == item {
| ^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::eq(self.first, item)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq
= note: `-D clippy::ptr-eq` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::ptr_eq)]`

However, a backport to relax a bit the `clippy::ptr_eq` finally landed,
and thus Clippy did not warn by the time the release happened.

Thus remove the `allow`s added back then, which were added just in case
the backport did not land in time.

See commit a39f30870927 ("rust: allow Rust 1.87.0's `clippy::ptr_eq`
lint") for details.

Link: https://github.com/rust-lang/rust/pull/140859 [1]
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250520182125.806758-1-ojeda@kernel.org
[ Reworded for clarity. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

-6
-3
rust/kernel/alloc/kvec.rs
··· 2 2 3 3 //! Implementation of [`Vec`]. 4 4 5 - // May not be needed in Rust 1.87.0 (pending beta backport). 6 - #![allow(clippy::ptr_eq)] 7 - 8 5 use super::{ 9 6 allocator::{KVmalloc, Kmalloc, Vmalloc}, 10 7 layout::ArrayLayout,
-3
rust/kernel/list.rs
··· 4 4 5 5 //! A linked list implementation. 6 6 7 - // May not be needed in Rust 1.87.0 (pending beta backport). 8 - #![allow(clippy::ptr_eq)] 9 - 10 7 use crate::sync::ArcBorrow; 11 8 use crate::types::Opaque; 12 9 use core::iter::{DoubleEndedIterator, FusedIterator};