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,

src/unix/linux_like/linux/gnu/b32/csky/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,

src/unix/linux_like/linux/gnu/b32/m68k/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 = i32;
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,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ s! {
163163
__f_spare: [c_int; 6],
164164
}
165165

166+
// FIXME(1.0): This should not implement `PartialEq`
167+
#[allow(unpredictable_function_pointer_comparisons)]
166168
pub struct sigaction {
167169
pub sa_flags: c_int,
168170
pub sa_sigaction: crate::sighandler_t,

src/unix/linux_like/linux/gnu/b32/powerpc.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 = i32;
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,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ s! {
108108
pub ss_size: size_t,
109109
}
110110

111+
// FIXME(1.0): This should not implement `PartialEq`
112+
#[allow(unpredictable_function_pointer_comparisons)]
111113
pub struct sigaction {
112114
pub sa_sigaction: crate::sighandler_t,
113115
pub sa_mask: crate::sigset_t,

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

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

88
s! {
9+
// FIXME(1.0): This should not implement `PartialEq`
10+
#[allow(unpredictable_function_pointer_comparisons)]
911
pub struct sigaction {
1012
pub sa_sigaction: crate::sighandler_t,
1113
pub sa_mask: crate::sigset_t,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ pub type wchar_t = i32;
55
pub type greg_t = i32;
66

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

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

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

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

src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ s! {
134134
__size: [c_ulong; 7],
135135
}
136136

137+
// FIXME(1.0): This should not implement `PartialEq`
138+
#[allow(unpredictable_function_pointer_comparisons)]
137139
pub struct sigaction {
138140
pub sa_sigaction: crate::sighandler_t,
139141
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/mips64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ s! {
136136
__size: [c_ulong; 7],
137137
}
138138

139+
// FIXME(1.0): This should not implement `PartialEq`
140+
#[allow(unpredictable_function_pointer_comparisons)]
139141
pub struct sigaction {
140142
pub sa_flags: c_int,
141143
pub sa_sigaction: crate::sighandler_t,

src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pub type __u64 = c_ulong;
1111
pub type __s64 = c_long;
1212

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

src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ s! {
143143
pub ss_size: size_t,
144144
}
145145

146+
// FIXME(1.0): This should not implement `PartialEq`
147+
#[allow(unpredictable_function_pointer_comparisons)]
146148
pub struct sigaction {
147149
pub sa_sigaction: crate::sighandler_t,
148150
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/s390x.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub type __u64 = u64;
1212
pub type __s64 = i64;
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
__glibc_reserved0: c_int,

src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs

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

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

src/unix/linux_like/linux/gnu/b64/x86_64/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/linux/musl/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ s! {
142142
__dummy4: [c_char; 16],
143143
}
144144

145+
// FIXME(1.0): This should not implement `PartialEq`
146+
#[allow(unpredictable_function_pointer_comparisons)]
145147
pub struct sigaction {
146148
pub sa_sigaction: crate::sighandler_t,
147149
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/uclibc/arm/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ s! {
163163
__val: [c_ulong; 2],
164164
}
165165

166+
// FIXME(1.0): This should not implement `PartialEq`
167+
#[allow(unpredictable_function_pointer_comparisons)]
166168
pub struct sigaction {
167169
pub sa_sigaction: crate::sighandler_t,
168170
pub sa_flags: c_ulong,

src/unix/linux_like/linux/uclibc/x86_64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ s! {
144144
st_pad4: [c_long; 3],
145145
}
146146

147+
// FIXME(1.0): This should not implement `PartialEq`
148+
#[allow(unpredictable_function_pointer_comparisons)]
147149
pub struct sigaction {
148150
pub sa_handler: crate::sighandler_t,
149151
pub sa_flags: c_ulong,

src/unix/nto/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,8 @@ s! {
576576
re_g: *mut c_void,
577577
}
578578

579+
// FIXME(1.0): This should not implement `PartialEq`
580+
#[allow(unpredictable_function_pointer_comparisons)]
579581
pub struct _thread_attr {
580582
pub __flags: c_int,
581583
pub __stacksize: size_t,

src/unix/nto/neutrino.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ s! {
137137
pub ev: crate::__c_anonymous_struct_ev,
138138
}
139139

140+
// FIXME(1.0): This should not implement `PartialEq`
141+
#[allow(unpredictable_function_pointer_comparisons)]
140142
pub struct _sighandler_info {
141143
pub siginfo: crate::siginfo_t,
142144
pub handler: Option<unsafe extern "C" fn(value: c_int)>,

src/unix/redox/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ s! {
157157
pub pw_shell: *mut c_char,
158158
}
159159

160+
// FIXME(1.0): This should not implement `PartialEq`
161+
#[allow(unpredictable_function_pointer_comparisons)]
160162
pub struct sigaction {
161163
pub sa_sigaction: crate::sighandler_t,
162164
pub sa_flags: c_ulong,

0 commit comments

Comments
 (0)