diff --git a/serde/build.rs b/serde/build.rs index 929d8e17..0f363c95 100644 --- a/serde/build.rs +++ b/serde/build.rs @@ -21,9 +21,6 @@ fn main() { // https://doc.rust-lang.org/core/ops/enum.Bound.html if minor < 26 { println!("cargo:rustc-cfg=no_ops_bound"); - if minor < 17 { - println!("cargo:rustc-cfg=no_collections_bound"); - } } // core::cmp::Reverse stabilized in Rust 1.19: diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index 12fbdfdb..44fa3669 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -2709,7 +2709,7 @@ mod range_to { //////////////////////////////////////////////////////////////////////////////// -#[cfg(any(not(no_ops_bound), all(feature = "std", not(no_collections_bound))))] +#[cfg(any(not(no_ops_bound), feature = "std"))] impl<'de, T> Deserialize<'de> for Bound where T: Deserialize<'de>, diff --git a/serde/src/lib.rs b/serde/src/lib.rs index 30c5e4d6..66fba92b 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -249,7 +249,7 @@ mod lib { #[cfg(feature = "std")] pub use std::time::{SystemTime, UNIX_EPOCH}; - #[cfg(all(feature = "std", not(no_collections_bound), no_ops_bound))] + #[cfg(all(feature = "std", no_ops_bound))] pub use std::collections::Bound; #[cfg(not(no_core_reverse))] diff --git a/serde/src/ser/impls.rs b/serde/src/ser/impls.rs index 9cafb326..5eb8f3de 100644 --- a/serde/src/ser/impls.rs +++ b/serde/src/ser/impls.rs @@ -310,7 +310,7 @@ where //////////////////////////////////////////////////////////////////////////////// -#[cfg(any(not(no_ops_bound), all(feature = "std", not(no_collections_bound))))] +#[cfg(any(not(no_ops_bound), feature = "std"))] impl Serialize for Bound where T: Serialize,