diff --git a/serde/build.rs b/serde/build.rs index 11228158..66f3b6ed 100644 --- a/serde/build.rs +++ b/serde/build.rs @@ -16,12 +16,6 @@ fn main() { let target = env::var("TARGET").unwrap(); let emscripten = target == "asmjs-unknown-emscripten" || target == "wasm32-unknown-emscripten"; - // core::cmp::Reverse stabilized in Rust 1.19: - // https://doc.rust-lang.org/stable/core/cmp/struct.Reverse.html - if minor < 19 { - println!("cargo:rustc-cfg=no_core_reverse"); - } - // CString::into_boxed_c_str and PathBuf::into_boxed_path stabilized in Rust 1.20: // https://doc.rust-lang.org/std/ffi/struct.CString.html#method.into_boxed_c_str // https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.into_boxed_path diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index 44fa3669..5dba42b2 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -753,7 +753,6 @@ macro_rules! forwarded_impl { ))] forwarded_impl!((), Box, CString::into_boxed_c_str); -#[cfg(not(no_core_reverse))] forwarded_impl!((T), Reverse, Reverse); //////////////////////////////////////////////////////////////////////////////// diff --git a/serde/src/lib.rs b/serde/src/lib.rs index 66fba92b..a8e56883 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -177,6 +177,7 @@ mod lib { pub use self::core::cell::{Cell, RefCell}; pub use self::core::clone::{self, Clone}; + pub use self::core::cmp::Reverse; pub use self::core::convert::{self, From, Into}; pub use self::core::default::{self, Default}; pub use self::core::fmt::{self, Debug, Display}; @@ -252,9 +253,6 @@ mod lib { #[cfg(all(feature = "std", no_ops_bound))] pub use std::collections::Bound; - #[cfg(not(no_core_reverse))] - pub use self::core::cmp::Reverse; - #[cfg(not(no_ops_bound))] pub use self::core::ops::Bound; diff --git a/serde/src/ser/impls.rs b/serde/src/ser/impls.rs index 5eb8f3de..541acf2d 100644 --- a/serde/src/ser/impls.rs +++ b/serde/src/ser/impls.rs @@ -963,7 +963,6 @@ where } } -#[cfg(not(no_core_reverse))] impl Serialize for Reverse where T: Serialize,