Delete support for compilers without inclusive range accessors
This commit is contained in:
parent
e77900fb94
commit
4dcf791706
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -72,18 +72,12 @@ jobs:
|
||||
if: matrix.os != 'windows'
|
||||
|
||||
build:
|
||||
name: Rust ${{matrix.rust}}
|
||||
name: Rust 1.34.0
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust: [1.26.0, 1.34.0]
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{matrix.rust}}
|
||||
- uses: dtolnay/rust-toolchain@1.34.0
|
||||
- run: cd serde && cargo build --features rc
|
||||
- run: cd serde && cargo build --no-default-features
|
||||
- run: cd serde && cargo build
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Serde   [![Build Status]][actions] [![Latest Version]][crates.io] [![serde: rustc 1.26+]][Rust 1.26] [![serde_derive: rustc 1.56+]][Rust 1.56]
|
||||
# Serde   [![Build Status]][actions] [![Latest Version]][crates.io] [![serde: rustc 1.27+]][Rust 1.27] [![serde_derive: rustc 1.56+]][Rust 1.56]
|
||||
|
||||
[Build Status]: https://img.shields.io/github/actions/workflow/status/serde-rs/serde/ci.yml?branch=master
|
||||
[actions]: https://github.com/serde-rs/serde/actions?query=branch%3Amaster
|
||||
[Latest Version]: https://img.shields.io/crates/v/serde.svg
|
||||
[crates.io]: https://crates.io/crates/serde
|
||||
[serde: rustc 1.26+]: https://img.shields.io/badge/serde-rustc_1.26+-lightgray.svg
|
||||
[serde: rustc 1.27+]: https://img.shields.io/badge/serde-rustc_1.27+-lightgray.svg
|
||||
[serde_derive: rustc 1.56+]: https://img.shields.io/badge/serde_derive-rustc_1.56+-lightgray.svg
|
||||
[Rust 1.26]: https://blog.rust-lang.org/2018/05/10/Rust-1.26.html
|
||||
[Rust 1.27]: https://blog.rust-lang.org/2018/06/21/Rust-1.27.html
|
||||
[Rust 1.56]: https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html
|
||||
|
||||
**Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.**
|
||||
|
@ -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.26"
|
||||
rust-version = "1.27"
|
||||
|
||||
[dependencies]
|
||||
serde_derive = { version = "=1.0.179", optional = true, path = "../serde_derive" }
|
||||
|
@ -16,12 +16,9 @@ fn main() {
|
||||
let target = env::var("TARGET").unwrap();
|
||||
let emscripten = target == "asmjs-unknown-emscripten" || target == "wasm32-unknown-emscripten";
|
||||
|
||||
// Inclusive ranges methods stabilized in Rust 1.27:
|
||||
// https://github.com/rust-lang/rust/pull/50758
|
||||
// Also Iterator::try_for_each:
|
||||
// Iterator::try_for_each stabilized in Rust 1.27:
|
||||
// https://blog.rust-lang.org/2018/06/21/Rust-1.27.html#library-stabilizations
|
||||
if minor < 27 {
|
||||
println!("cargo:rustc-cfg=no_range_inclusive");
|
||||
println!("cargo:rustc-cfg=no_iterator_try_fold");
|
||||
}
|
||||
|
||||
|
@ -2238,7 +2238,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(no_range_inclusive))]
|
||||
impl<'de, Idx> Deserialize<'de> for RangeInclusive<Idx>
|
||||
where
|
||||
Idx: Deserialize<'de>,
|
||||
|
@ -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::{Bound, Range, RangeFrom, RangeTo};
|
||||
pub use self::core::ops::{Bound, Range, RangeFrom, RangeInclusive, RangeTo};
|
||||
pub use self::core::option::{self, Option};
|
||||
pub use self::core::result::{self, Result};
|
||||
pub use self::core::time::Duration;
|
||||
@ -251,9 +251,6 @@ mod lib {
|
||||
#[cfg(feature = "std")]
|
||||
pub use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
#[cfg(not(no_range_inclusive))]
|
||||
pub use self::core::ops::RangeInclusive;
|
||||
|
||||
#[cfg(all(feature = "std", no_target_has_atomic, not(no_std_atomic)))]
|
||||
pub use std::sync::atomic::{
|
||||
AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicU16, AtomicU32, AtomicU8,
|
||||
|
@ -274,7 +274,6 @@ where
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[cfg(not(no_range_inclusive))]
|
||||
impl<Idx> Serialize for RangeInclusive<Idx>
|
||||
where
|
||||
Idx: Serialize,
|
||||
|
Loading…
Reference in New Issue
Block a user