Skip to content

Commit a6fa777

Browse files
committed
fix(CI): run on --all-features
1 parent 149d392 commit a6fa777

File tree

7 files changed

+82
-115
lines changed

7 files changed

+82
-115
lines changed

ci/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,5 @@ else
122122
$cmd --no-default-features
123123
$cmd
124124
$cmd --features extra_traits
125+
$cmd --all-features
125126
fi

src/macros.rs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ macro_rules! s {
110110
#[repr(C)]
111111
#[cfg_attr(
112112
feature = "extra_traits",
113-
::core::prelude::v1::derive(Debug, Eq, Hash, PartialEq)
113+
::core::prelude::v1::derive(
114+
::core::fmt::Debug,
115+
::core::cmp::Eq,
116+
::core::hash::Hash,
117+
::core::cmp::PartialEq
118+
)
114119
)]
115120
#[::core::prelude::v1::derive(::core::clone::Clone, ::core::marker::Copy)]
116121
#[allow(deprecated)]
@@ -132,7 +137,12 @@ macro_rules! s_paren {
132137
__item! {
133138
#[cfg_attr(
134139
feature = "extra_traits",
135-
::core::prelude::v1::derive(Debug, Eq, Hash, PartialEq)
140+
::core::prelude::v1::derive(
141+
::core::fmt::Debug,
142+
::core::cmp::Eq,
143+
::core::hash::Hash,
144+
::core::cmp::PartialEq
145+
)
136146
)]
137147
#[::core::prelude::v1::derive(::core::clone::Clone, ::core::marker::Copy)]
138148
$(#[$attr])*
@@ -159,6 +169,13 @@ macro_rules! s_no_extra_traits {
159169
$(#[$attr])*
160170
pub union $i { $($field)* }
161171
}
172+
173+
#[cfg(feature = "extra_traits")]
174+
impl ::core::fmt::Debug for $i {
175+
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
176+
f.debug_struct(::core::stringify!($i)).finish_non_exhaustive()
177+
}
178+
}
162179
);
163180

164181
(it: $(#[$attr:meta])* pub struct $i:ident { $($field:tt)* }) => (
@@ -194,7 +211,12 @@ macro_rules! e {
194211
__item! {
195212
#[cfg_attr(
196213
feature = "extra_traits",
197-
::core::prelude::v1::derive(Debug, Eq, Hash, PartialEq)
214+
::core::prelude::v1::derive(
215+
::core::fmt::Debug,
216+
::core::cmp::Eq,
217+
::core::hash::Hash,
218+
::core::cmp::PartialEq
219+
)
198220
)]
199221
#[::core::prelude::v1::derive(::core::clone::Clone, ::core::marker::Copy)]
200222
$(#[$attr])*

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ s_no_extra_traits! {
325325

326326
cfg_if! {
327327
if #[cfg(feature = "extra_traits")] {
328-
impl PartialEq for user_fpregs_struct {
328+
use core::iter::Iterator;
329+
impl core::cmp::PartialEq for user_fpregs_struct {
329330
fn eq(&self, other: &user_fpregs_struct) -> bool {
330331
self.cwd == other.cwd
331332
&& self.swd == other.swd
@@ -345,7 +346,7 @@ cfg_if! {
345346
}
346347
}
347348

348-
impl Eq for user_fpregs_struct {}
349+
impl core::cmp::Eq for user_fpregs_struct {}
349350

350351
impl fmt::Debug for user_fpregs_struct {
351352
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -379,7 +380,7 @@ cfg_if! {
379380
}
380381
}
381382

382-
impl PartialEq for ucontext_t {
383+
impl core::cmp::PartialEq for ucontext_t {
383384
fn eq(&self, other: &ucontext_t) -> bool {
384385
self.uc_flags == other.uc_flags
385386
&& self.uc_link == other.uc_link
@@ -390,7 +391,7 @@ cfg_if! {
390391
}
391392
}
392393

393-
impl Eq for ucontext_t {}
394+
impl core::cmp::Eq for ucontext_t {}
394395

395396
impl fmt::Debug for ucontext_t {
396397
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ impl siginfo_t {
418418
}
419419

420420
s_no_extra_traits! {
421-
#[cfg_attr(feature = "extra_traits", derive(Debug))]
421+
#[cfg_attr(feature = "extra_traits", ::core::prelude::v1::derive(::core::fmt::Debug))]
422422
pub struct aiocb {
423423
pub aio_fildes: c_int,
424424
pub aio_lio_opcode: c_int,
@@ -557,7 +557,8 @@ s_no_extra_traits! {
557557

558558
cfg_if! {
559559
if #[cfg(feature = "extra_traits")] {
560-
impl PartialEq for utmpx {
560+
use core::iter::Iterator;
561+
impl core::cmp::PartialEq for utmpx {
561562
fn eq(&self, other: &utmpx) -> bool {
562563
self.ut_type == other.ut_type
563564
&& self.ut_pid == other.ut_pid
@@ -577,7 +578,7 @@ cfg_if! {
577578
}
578579
}
579580

580-
impl Eq for utmpx {}
581+
impl core::cmp::Eq for utmpx {}
581582

582583
impl fmt::Debug for utmpx {
583584
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -613,7 +614,7 @@ cfg_if! {
613614
}
614615
}
615616

616-
impl PartialEq for __c_anonymous_ptrace_syscall_info_data {
617+
impl core::cmp::PartialEq for __c_anonymous_ptrace_syscall_info_data {
617618
fn eq(&self, other: &__c_anonymous_ptrace_syscall_info_data) -> bool {
618619
unsafe {
619620
self.entry == other.entry
@@ -623,7 +624,7 @@ cfg_if! {
623624
}
624625
}
625626

626-
impl Eq for __c_anonymous_ptrace_syscall_info_data {}
627+
impl core::cmp::Eq for __c_anonymous_ptrace_syscall_info_data {}
627628

628629
impl fmt::Debug for __c_anonymous_ptrace_syscall_info_data {
629630
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

0 commit comments

Comments
 (0)