mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 09:09:47 +02:00
Starting with Rust 1.87.0 (expected 2025-05-15) [1], Clippy may expand
the `ptr_eq` lint, e.g.:
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)]`
It is expected that a PR to relax the lint will be backported [2] by
the time Rust 1.87.0 releases, since the lint was considered too eager
(at least by default) [3].
Thus allow the lint temporarily just in case.
Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Link: https://github.com/rust-lang/rust-clippy/pull/14339 [1]
Link: https://github.com/rust-lang/rust-clippy/pull/14526 [2]
Link: https://github.com/rust-lang/rust-clippy/issues/14525 [3]
Link: https://lore.kernel.org/r/20250502140237.1659624-3-ojeda@kernel.org
[ Converted to `allow`s since backport was confirmed. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
|
||
|---|---|---|
| .. | ||
| alloc | ||
| block | ||
| fs | ||
| list | ||
| net | ||
| sync | ||
| time | ||
| .gitignore | ||
| alloc.rs | ||
| block.rs | ||
| build_assert.rs | ||
| cred.rs | ||
| device.rs | ||
| device_id.rs | ||
| devres.rs | ||
| dma.rs | ||
| driver.rs | ||
| error.rs | ||
| faux.rs | ||
| firmware.rs | ||
| fs.rs | ||
| generated_arch_static_branch_asm.rs.S | ||
| init.rs | ||
| io.rs | ||
| ioctl.rs | ||
| jump_label.rs | ||
| kunit.rs | ||
| lib.rs | ||
| list.rs | ||
| miscdevice.rs | ||
| net.rs | ||
| of.rs | ||
| page.rs | ||
| pci.rs | ||
| pid_namespace.rs | ||
| platform.rs | ||
| prelude.rs | ||
| print.rs | ||
| rbtree.rs | ||
| revocable.rs | ||
| security.rs | ||
| seq_file.rs | ||
| sizes.rs | ||
| static_assert.rs | ||
| std_vendor.rs | ||
| str.rs | ||
| sync.rs | ||
| task.rs | ||
| time.rs | ||
| tracepoint.rs | ||
| transmute.rs | ||
| types.rs | ||
| uaccess.rs | ||
| workqueue.rs | ||