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,

0 commit comments

Comments
 (0)