Skip to content

Commit 5134058

Browse files
committed
Allow new unpredictable_function_pointer_comparisons lints
These appeared in a recent nightly from our `PartialEq` derives. Add `allow`s where needed to suppress them, since removing the derive would be breaking. (backport <#4489>) [ applied to PSP as well - Trevor ] (cherry picked from commit e637810)
1 parent 9288ec0 commit 5134058

File tree

31 files changed

+75
-0
lines changed

31 files changed

+75
-0
lines changed

src/fuchsia/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ s! {
292292
__dummy4: [c_char; 16],
293293
}
294294

295+
// FIXME(1.0): This should not implement `PartialEq`
296+
#[allow(unpredictable_function_pointer_comparisons)]
295297
pub struct sigaction {
296298
pub sa_sigaction: crate::sighandler_t,
297299
pub sa_mask: crate::sigset_t,

src/psp.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,8 @@ s! {
14151415
pub stack: [u32; 8],
14161416
}
14171417

1418+
// FIXME(1.0): This should not implement `PartialEq`
1419+
#[allow(unpredictable_function_pointer_comparisons)]
14181420
pub struct GeCallbackData {
14191421
pub signal_func: Option<extern "C" fn(id: i32, arg: *mut c_void)>,
14201422
pub signal_arg: *mut c_void,
@@ -1537,6 +1539,8 @@ s! {
15371539
pub stack_mpid: SceUid,
15381540
}
15391541

1542+
// FIXME(1.0): This should not implement `PartialEq`
1543+
#[allow(unpredictable_function_pointer_comparisons)]
15401544
pub struct SceKernelThreadInfo {
15411545
pub size: usize,
15421546
pub name: [u8; 32],
@@ -1611,6 +1615,8 @@ s! {
16111615
pub first_message: *mut c_void,
16121616
}
16131617

1618+
// FIXME(1.0): This should not implement `PartialEq`
1619+
#[allow(unpredictable_function_pointer_comparisons)]
16141620
pub struct SceKernelVTimerInfo {
16151621
pub size: usize,
16161622
pub name: [u8; 32],
@@ -1622,6 +1628,8 @@ s! {
16221628
pub common: *mut c_void,
16231629
}
16241630

1631+
// FIXME(1.0): This should not implement `PartialEq`
1632+
#[allow(unpredictable_function_pointer_comparisons)]
16251633
pub struct SceKernelThreadEventHandlerInfo {
16261634
pub size: usize,
16271635
pub name: [u8; 32],
@@ -1631,6 +1639,8 @@ s! {
16311639
pub common: *mut c_void,
16321640
}
16331641

1642+
// FIXME(1.0): This should not implement `PartialEq`
1643+
#[allow(unpredictable_function_pointer_comparisons)]
16341644
pub struct SceKernelAlarmInfo {
16351645
pub size: usize,
16361646
pub schedule: SceKernelSysClock,
@@ -1688,6 +1698,8 @@ s! {
16881698
pub size: usize,
16891699
}
16901700

1701+
// FIXME(1.0): This should not implement `PartialEq`
1702+
#[allow(unpredictable_function_pointer_comparisons)]
16911703
pub struct SceKernelCallbackInfo {
16921704
pub size: usize,
16931705
pub name: [u8; 32usize],
@@ -1787,6 +1799,8 @@ s! {
17871799
pub type_: UmdType,
17881800
}
17891801

1802+
// FIXME(1.0): This should not implement `PartialEq`
1803+
#[allow(unpredictable_function_pointer_comparisons)]
17901804
pub struct SceMpegRingbuffer {
17911805
pub packets: i32,
17921806
pub unk0: u32,

src/unix/bsd/apple/b64/x86_64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ s! {
109109
_private: [crate::uintptr_t; 16], // FIXME(macos): keeping private for now
110110
}
111111

112+
// FIXME(1.0): This should not implement `PartialEq`
113+
#[allow(unpredictable_function_pointer_comparisons)]
112114
pub struct malloc_zone_t {
113115
_reserved1: *mut c_void,
114116
_reserved2: *mut c_void,

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ s_no_extra_traits! {
520520
pub mc_fpregs: [[c_uint; 8]; 32],
521521
}
522522

523+
// FIXME(1.0): This should not implement `PartialEq`
524+
#[allow(unpredictable_function_pointer_comparisons)]
523525
pub struct ucontext_t {
524526
pub uc_sigmask: crate::sigset_t,
525527
pub uc_mcontext: mcontext_t,

src/unix/cygwin/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ s! {
351351
pub cr2: u64,
352352
}
353353

354+
// FIXME(1.0): This should not implement `PartialEq`
355+
#[allow(unpredictable_function_pointer_comparisons)]
354356
pub struct sigevent {
355357
pub sigev_value: sigval,
356358
pub sigev_signo: c_int,

src/unix/haiku/native.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,14 @@ s! {
403403
}
404404

405405
// kernel/image.h
406+
// FIXME(1.0): This should not implement `PartialEq`
407+
#[allow(unpredictable_function_pointer_comparisons)]
406408
pub struct image_info {
407409
pub id: image_id,
408410
pub image_type: c_int,
409411
pub sequence: i32,
410412
pub init_order: i32,
413+
// FIXME(1.0): these should be made optional
411414
pub init_routine: extern "C" fn(),
412415
pub term_routine: extern "C" fn(),
413416
pub device: crate::dev_t,

src/unix/linux_like/android/b32/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub type __u64 = c_ulonglong;
1212
pub type __s64 = c_longlong;
1313

1414
s! {
15+
// FIXME(1.0): This should not implement `PartialEq`
16+
#[allow(unpredictable_function_pointer_comparisons)]
1517
pub struct sigaction {
1618
pub sa_sigaction: crate::sighandler_t,
1719
pub sa_mask: crate::sigset_t,

src/unix/linux_like/android/b64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ s! {
1212
__val: [c_ulong; 1],
1313
}
1414

15+
// FIXME(1.0): This should not implement `PartialEq`
16+
#[allow(unpredictable_function_pointer_comparisons)]
1517
pub struct sigaction {
1618
pub sa_flags: c_int,
1719
pub sa_sigaction: crate::sighandler_t,

src/unix/linux_like/emscripten/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ s! {
158158
pub sem_flg: c_short,
159159
}
160160

161+
// FIXME(1.0): This should not implement `PartialEq`
162+
#[allow(unpredictable_function_pointer_comparisons)]
161163
pub struct sigaction {
162164
pub sa_sigaction: crate::sighandler_t,
163165
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b32/arm/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use crate::{off64_t, off_t};
44
pub type wchar_t = u32;
55

66
s! {
7+
// FIXME(1.0): This should not implement `PartialEq`
8+
#[allow(unpredictable_function_pointer_comparisons)]
79
pub struct sigaction {
810
pub sa_sigaction: crate::sighandler_t,
911
pub sa_mask: crate::sigset_t,

0 commit comments

Comments
 (0)