Skip to content

Commit b135afc

Browse files
committed
Allow missing debug instead of impl Debug for union in this case
1 parent 128c36d commit b135afc

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/unix/solarish/mod.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -479,18 +479,19 @@ s_no_extra_traits! {
479479
__sigev_pad2: ::c_int,
480480
}
481481

482+
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
482483
pub union door_desc_t__d_data {
483484
pub d_desc: door_desc_t__d_data__d_desc,
484485
d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */
485486
}
486487

487-
#[derive(Debug)]
488+
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
488489
pub struct door_desc_t {
489490
pub d_attributes: door_attr_t,
490491
pub d_data: door_desc_t__d_data,
491492
}
492493

493-
#[derive(Debug)]
494+
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))]
494495
pub struct door_arg_t {
495496
pub data_ptr: *const ::c_char,
496497
pub data_size: ::size_t,
@@ -559,21 +560,6 @@ cfg_if! {
559560
}
560561
}
561562

562-
impl ::fmt::Debug for door_desc_t__d_data {
563-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
564-
unsafe {
565-
match self {
566-
Self { d_desc } => f.debug_struct("door_desc_t__d_data")
567-
.field("d_desc", &self.d_desc)
568-
.finish(),
569-
Self { d_resv } => f.debug_struct("door_desc_t__d_data")
570-
.field("d_resv", &self.d_resv)
571-
.finish(),
572-
}
573-
}
574-
}
575-
}
576-
577563
impl PartialEq for epoll_event {
578564
fn eq(&self, other: &epoll_event) -> bool {
579565
self.events == other.events

0 commit comments

Comments
 (0)