rust: remove unneeded Rust 1.87.0 `allow(clippy::ptr_eq)`
Subsystems (2)
Miguel Ojeda
maintainerPATCH 1/1 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 allows we 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.
--- rust/kernel/alloc/kvec.rs | 3 --- rust/kernel/list.rs | 3 --- 2 files changed, 6 deletions(-)
rust/kernel/alloc/kvec.rs +0 -3
@@ -2,9 +2,6 @@//! Implementation of [`Vec`]. -// May not be needed in Rust 1.87.0 (pending beta backport). -#![allow(clippy::ptr_eq)] -use super ::{ allocator::{KVmalloc ,Kmalloc ,Vmalloc }, layout::ArrayLayout ,
rust/kernel/list.rs +0 -3
@@ -4,9 +4,6 @@//! A linked list implementation. -// May not be needed in Rust 1.87.0 (pending beta backport). -#![allow(clippy::ptr_eq)] -use crate ::sync::ArcBorrow ;use crate ::types::Opaque ;use core::iter::{DoubleEndedIterator ,FusedIterator };
base-commit: a5806cd506af5a7c19bcd596e4708b5c464bfd21
Signature · 1 line
2.49.0
Quoted 17 lines · Miguel Ojeda
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
allows we added back then, which were added just in case the backport did not land in time.
Quoted 5 lines
See commit
a39f30870927("rust: allow Rust 1.87.0'sclippy::ptr_eqlint") for details.Signed-off-by Miguel Ojeda <[email protected]>
This commit message is worded in a confusing manner, but the change LGTM.
Quoted 3 lines · Alice Ryhl
This commit message is worded in a confusing manner, but the change LGTM.
Yeah, I wrote via rearranging a previous one, and sounds a bit strange. I can try to clarify it when I apply it.
Thanks!
Cheers,
Miguel
Miguel Ojeda
AppliedQuoted 18 lines · Miguel Ojeda
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
allows we added back then, which were added just in case the backport did not land in time.
Quoted 5 lines
See commit
a39f30870927("rust: allow Rust 1.87.0'sclippy::ptr_eqlint") for details.Signed-off-by Miguel Ojeda <[email protected]>
Applied to rust-next -- thanks everyone!
[ Reworded for clarity. - Miguel ]
Cheers,
Miguel