Skip to content

Commit 7480fd6

Browse files
committed
rust: remove unneeded Rust 1.87.0 allow(clippy::ptr_eq)
Before a change to relax the lint was backported to Rust 1.87.0 before its 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)]` The backported finally landed indeed, thus remove the `allow`s we added back then, which were added just in case the backport did not land in time. See commit a39f308 ("rust: allow Rust 1.87.0's `clippy::ptr_eq` lint") for details. Link: rust-lang/rust#140859 [1] Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent ae8b3a8 commit 7480fd6

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

rust/kernel/alloc/kvec.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Implementation of [`Vec`].
44
5-
// May not be needed in Rust 1.87.0 (pending beta backport).
6-
#![allow(clippy::ptr_eq)]
7-
85
use super::{
96
allocator::{KVmalloc, Kmalloc, Vmalloc},
107
layout::ArrayLayout,

rust/kernel/list.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
//! A linked list implementation.
66
7-
// May not be needed in Rust 1.87.0 (pending beta backport).
8-
#![allow(clippy::ptr_eq)]
9-
107
use crate::sync::ArcBorrow;
118
use crate::types::Opaque;
129
use core::iter::{DoubleEndedIterator, FusedIterator};

0 commit comments

Comments
 (0)