Skip to content

Commit

Permalink
Auto merge of #2659 - tmandry:fix-freebsd-std, r=Amanieu
Browse files Browse the repository at this point in the history
Gate PartialEq and Eq on freebsd objects behind extra_traits

This fixes the failure in rust-lang/rust#93351 (comment).

These derives were recently added in #2565. Other PartialEq/Eq derives in the project (and this file) are all behind the `extra_traits` gate.
  • Loading branch information
bors committed Jan 28, 2022
2 parents ba81130 + e5f0e5f commit 2dc7cfe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
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

0 comments on commit 2dc7cfe

Please sign in to comment.