rust/tests
Alex Macleod 2422f0b9ac
Restrict the cases where ptr_eq triggers (#14526)
`ptr_eq` was recently enhanced to lint on more cases of raw pointers
comparison:

- lint on all raw pointer comparison, by proposing to use
`[core|std]::ptr::eq(lhs, rhs)` instead of `lhs == rhs`;
- removing one symetric `as usize` on each size if needed
- peeling any level of `as *[const|mut] _` if the remaining expression
can still be coerced into the original one (i.e., is a ref or raw
pointer to the same type as before)

The current change restricts the lint to the cases where at least one
level of symetric `as usize`, or any conversion to a raw pointer, could
be removed. For example, a direct comparaison of two raw pointers will
not trigger the lint anymore.

changelog: [`ptr_eq`]: do not lint when comparing two raw pointers
directly with no casts involved

Fixes rust-lang/rust-clippy#14525
2025-04-22 16:05:34 +00:00
..
test_utils
ui Restrict the cases where ptr_eq triggers (#14526) 2025-04-22 16:05:34 +00:00
ui-cargo Merge commit '9f9a822509' into clippy-subtree-update 2025-02-28 23:27:09 +01:00
ui-internal Replace interning of string literals with preinterned symbols 2025-04-18 22:44:16 +00:00
ui-toml Add unsafe markers to accomodate edition 2024 rules 2025-04-15 20:33:01 +02:00
workspace_test
check-fmt.rs
clippy.toml Fix situations identified by collapsible_if new hits 2025-03-25 19:50:24 +01:00
compile-test.rs Run UI tests with edition 2024 by default 2025-04-15 20:33:01 +02:00
config-metadata.rs
dogfood.rs Move internal lints to their own crate (#13223) 2025-04-18 12:04:08 +00:00
headers.rs
integration.rs
lint_message_convention.rs Merge commit '1e5237f4a5' into clippy-subtree-update 2025-03-20 22:34:29 +01:00
missing-test-files.rs Merge commit '51d49c1ae2' into clippy-subtree-update 2025-01-28 19:33:54 +01:00
versioncheck.rs Clippy: skip check_host_compiler check in rustc testsuite 2025-02-28 23:27:22 +01:00
workspace.rs