about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-30 15:53:28 +0000
committerbors <bors@rust-lang.org>2024-03-30 15:53:28 +0000
commitef493651025db2d5c38225c12ef97fd832c00c4a (patch)
treea38fdc8cde8cbc30b461823f2841fdcc2827791d /compiler/rustc_data_structures/src
parent18527282244431f597720e4fd42199e7333cc1c1 (diff)
parent16d11c539f9783a5e066d90a7d7b17f70ee2b086 (diff)
downloadrust-ef493651025db2d5c38225c12ef97fd832c00c4a.tar.gz
rust-ef493651025db2d5c38225c12ef97fd832c00c4a.zip
Auto merge of #123207 - Urgau:improve_ambi_non_null, r=Nadrieril
Add support for `NonNull`s in the `ambiguous_wide_ptr_comparisions` lint

This PR add support for `NonNull` pointers in the `ambiguous_wide_ptr_comparisions` lint.

Fixes https://github.com/rust-lang/rust/issues/121264
r? `@Nadrieril` (since you just reviewed #121268, feel free to reassign)
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/tagged_ptr/copy.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs
index ff4208def31..8b9e834b60b 100644
--- a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs
+++ b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs
@@ -243,6 +243,7 @@ where
     T: Tag,
 {
     #[inline]
+    #[allow(ambiguous_wide_pointer_comparisons)]
     fn eq(&self, other: &Self) -> bool {
         self.packed == other.packed
     }