Skip to content

Commit

Permalink
Allow the unpredictable_function_pointer_comparisons in one place
Browse files Browse the repository at this point in the history
This lint was recently added so this change is needed to fix CI. The
suggested alternative is to use `ptr::fn_addr_eq` which isn't available
until 1.85, so allow the lint here.

This is in a `PartialEq` for a union so hopefully this code should go
away in 1.0 anyway.
  • Loading branch information
tgross35 committed Dec 7, 2024
1 parent 149d392 commit 0ed3881
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ cfg_if! {
}
}

// FIXME(msrv): suggested method was added in 1.85
#[allow(unpredictable_function_pointer_comparisons)]
impl PartialEq for __c_anonymous_elf64_auxv_union {
fn eq(&self, other: &__c_anonymous_elf64_auxv_union) -> bool {
unsafe {
Expand Down

0 comments on commit 0ed3881

Please sign in to comment.