mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 00:51:02 +00:00
Delete support for compilers without core::cmp::Reverse
This commit is contained in:
@@ -16,12 +16,6 @@ fn main() {
|
|||||||
let target = env::var("TARGET").unwrap();
|
let target = env::var("TARGET").unwrap();
|
||||||
let emscripten = target == "asmjs-unknown-emscripten" || target == "wasm32-unknown-emscripten";
|
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:
|
// 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/ffi/struct.CString.html#method.into_boxed_c_str
|
||||||
// https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.into_boxed_path
|
// https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.into_boxed_path
|
||||||
|
|||||||
@@ -753,7 +753,6 @@ macro_rules! forwarded_impl {
|
|||||||
))]
|
))]
|
||||||
forwarded_impl!((), Box<CStr>, CString::into_boxed_c_str);
|
forwarded_impl!((), Box<CStr>, CString::into_boxed_c_str);
|
||||||
|
|
||||||
#[cfg(not(no_core_reverse))]
|
|
||||||
forwarded_impl!((T), Reverse<T>, Reverse);
|
forwarded_impl!((T), Reverse<T>, Reverse);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
+1
-3
@@ -177,6 +177,7 @@ mod lib {
|
|||||||
|
|
||||||
pub use self::core::cell::{Cell, RefCell};
|
pub use self::core::cell::{Cell, RefCell};
|
||||||
pub use self::core::clone::{self, Clone};
|
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::convert::{self, From, Into};
|
||||||
pub use self::core::default::{self, Default};
|
pub use self::core::default::{self, Default};
|
||||||
pub use self::core::fmt::{self, Debug, Display};
|
pub use self::core::fmt::{self, Debug, Display};
|
||||||
@@ -252,9 +253,6 @@ mod lib {
|
|||||||
#[cfg(all(feature = "std", no_ops_bound))]
|
#[cfg(all(feature = "std", no_ops_bound))]
|
||||||
pub use std::collections::Bound;
|
pub use std::collections::Bound;
|
||||||
|
|
||||||
#[cfg(not(no_core_reverse))]
|
|
||||||
pub use self::core::cmp::Reverse;
|
|
||||||
|
|
||||||
#[cfg(not(no_ops_bound))]
|
#[cfg(not(no_ops_bound))]
|
||||||
pub use self::core::ops::Bound;
|
pub use self::core::ops::Bound;
|
||||||
|
|
||||||
|
|||||||
@@ -963,7 +963,6 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_core_reverse))]
|
|
||||||
impl<T> Serialize for Reverse<T>
|
impl<T> Serialize for Reverse<T>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize,
|
||||||
|
|||||||
Reference in New Issue
Block a user