Delete support for compilers without core::ops::Bound

This commit is contained in:
David Tolnay
2023-07-30 20:55:29 -07:00
parent 4f59cd217a
commit 1b14cadf20
7 changed files with 6 additions and 21 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ keywords = ["serde", "serialization", "no_std"]
license = "MIT OR Apache-2.0"
readme = "crates-io.md"
repository = "https://github.com/serde-rs/serde"
rust-version = "1.25"
rust-version = "1.26"
[dependencies]
serde_derive = { version = "=1.0.179", optional = true, path = "../serde_derive" }
-7
View File
@@ -16,13 +16,6 @@ fn main() {
let target = env::var("TARGET").unwrap();
let emscripten = target == "asmjs-unknown-emscripten" || target == "wasm32-unknown-emscripten";
// std::collections::Bound was stabilized in Rust 1.17
// but it was moved to core::ops later in Rust 1.26:
// https://doc.rust-lang.org/core/ops/enum.Bound.html
if minor < 26 {
println!("cargo:rustc-cfg=no_ops_bound");
}
// 128-bit integers stabilized in Rust 1.26:
// https://blog.rust-lang.org/2018/05/10/Rust-1.26.html
//
-1
View File
@@ -2666,7 +2666,6 @@ mod range_to {
////////////////////////////////////////////////////////////////////////////////
#[cfg(any(not(no_ops_bound), feature = "std"))]
impl<'de, T> Deserialize<'de> for Bound<T>
where
T: Deserialize<'de>,
+1 -7
View File
@@ -183,7 +183,7 @@ mod lib {
pub use self::core::fmt::{self, Debug, Display};
pub use self::core::marker::{self, PhantomData};
pub use self::core::num::Wrapping;
pub use self::core::ops::{Range, RangeFrom, RangeTo};
pub use self::core::ops::{Bound, Range, RangeFrom, RangeTo};
pub use self::core::option::{self, Option};
pub use self::core::result::{self, Result};
pub use self::core::time::Duration;
@@ -251,12 +251,6 @@ mod lib {
#[cfg(feature = "std")]
pub use std::time::{SystemTime, UNIX_EPOCH};
#[cfg(all(feature = "std", no_ops_bound))]
pub use std::collections::Bound;
#[cfg(not(no_ops_bound))]
pub use self::core::ops::Bound;
#[cfg(not(no_range_inclusive))]
pub use self::core::ops::RangeInclusive;
-1
View File
@@ -310,7 +310,6 @@ where
////////////////////////////////////////////////////////////////////////////////
#[cfg(any(not(no_ops_bound), feature = "std"))]
impl<T> Serialize for Bound<T>
where
T: Serialize,