Skip to content

Commit a9770d0

Browse files
committed
fix: allow intentional wide pointer comparisons
Signed-off-by: Martin Kröning <[email protected]>
1 parent f32e547 commit a9770d0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/volatile_ptr/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ where
8888
T: ?Sized,
8989
{
9090
fn cmp(&self, other: &Self) -> Ordering {
91+
#[allow(ambiguous_wide_pointer_comparisons)]
9192
Ord::cmp(&self.pointer.as_ptr(), &other.pointer.as_ptr())
9293
}
9394
}

src/volatile_ref.rs

+1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ where
323323
T: ?Sized,
324324
{
325325
fn cmp(&self, other: &Self) -> Ordering {
326+
#[allow(ambiguous_wide_pointer_comparisons)]
326327
Ord::cmp(&self.pointer.as_ptr(), &other.pointer.as_ptr())
327328
}
328329
}

0 commit comments

Comments
 (0)