Skip to content

Commit f88be02

Browse files
authored
Merge pull request #4489 from tgross35/lint-fixes
Allow new `unpredictable_function_pointer_comparisons` lints
2 parents aa5bbcc + e637810 commit f88be02

File tree

31 files changed

+63
-0
lines changed

31 files changed

+63
-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/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; 256],
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/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ impl Clone for devstat_select_mode {
237237
}
238238

239239
s! {
240+
// FIXME(1.0): This should not implement `PartialEq`
241+
#[allow(unpredictable_function_pointer_comparisons)]
240242
pub struct __c_anonymous_sigev_thread {
241243
pub _function: Option<extern "C" fn(crate::sigval) -> *mut c_void>,
242244
//pub _function: *mut c_void, // Actually a function pointer

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
@@ -122,6 +122,8 @@ impl siginfo_t {
122122
}
123123

124124
s! {
125+
// FIXME(1.0): This should not implement `PartialEq`
126+
#[allow(unpredictable_function_pointer_comparisons)]
125127
pub struct sigaction {
126128
pub sa_sigaction: crate::sighandler_t,
127129
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
@@ -132,6 +132,8 @@ s! {
132132
st_pad4: [c_long; 3],
133133
}
134134

135+
// FIXME(1.0): This should not implement `PartialEq`
136+
#[allow(unpredictable_function_pointer_comparisons)]
135137
pub struct sigaction {
136138
pub sa_handler: crate::sighandler_t,
137139
pub sa_flags: c_ulong,

src/unix/linux_like/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ missing! {
1414
}
1515

1616
s! {
17+
// FIXME(1.0): This should not implement `PartialEq`
18+
#[allow(unpredictable_function_pointer_comparisons)]
1719
pub struct __c_anonymous_sigev_thread {
1820
pub _function: Option<extern "C" fn(crate::sigval) -> *mut c_void>,
1921
pub _attribute: *mut crate::pthread_attr_t,

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)