Skip to content

Gate PartialEq and Eq on freebsd objects behind extra_traits #2659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc"
version = "0.2.115"
version = "0.2.116"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion libc-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc-test"
version = "0.2.115"
version = "0.2.116"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
build = "build.rs"
Expand Down
24 changes: 8 additions & 16 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ pub type au_asid_t = ::pid_t;
// making the type definition system dependent. Better not bind it exactly.
pub type kvm_t = ::c_void;

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_support_flags {
DEVSTAT_ALL_SUPPORTED = 0x00,
Expand All @@ -64,8 +63,7 @@ impl ::Clone for devstat_support_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_trans_flags {
DEVSTAT_NO_DATA = 0x00,
Expand All @@ -81,8 +79,7 @@ impl ::Clone for devstat_trans_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_tag_type {
DEVSTAT_TAG_SIMPLE = 0x00,
Expand All @@ -97,8 +94,7 @@ impl ::Clone for devstat_tag_type {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_match_flags {
DEVSTAT_MATCH_NONE = 0x00,
Expand All @@ -113,8 +109,7 @@ impl ::Clone for devstat_match_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_priority {
DEVSTAT_PRIORITY_MIN = 0x000,
Expand All @@ -135,8 +130,7 @@ impl ::Clone for devstat_priority {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_type_flags {
DEVSTAT_TYPE_DIRECT = 0x000,
Expand Down Expand Up @@ -168,8 +162,7 @@ impl ::Clone for devstat_type_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_metric {
DSM_NONE,
Expand Down Expand Up @@ -226,8 +219,7 @@ impl ::Clone for devstat_metric {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_select_mode {
DS_SELECT_ADD,
Expand Down