From d656b4dd6ae448f34c2ad1f6b7bc39ed594bcac2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 19 Oct 2025 14:52:24 -0700 Subject: [PATCH] Raise required compiler for serde_derive to Rust 1.65 --- .github/workflows/ci.yml | 4 ++-- README.md | 6 +++--- serde/build.rs | 4 ++-- serde_core/build.rs | 10 +++++----- serde_derive/Cargo.toml | 2 +- serde_derive_internals/Cargo.toml | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c79633d..a994ab90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,12 +98,12 @@ jobs: - run: cd serde && cargo build derive: - name: Rust 1.61.0 + name: Rust 1.65.0 runs-on: ubuntu-latest timeout-minutes: 45 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.61.0 + - uses: dtolnay/rust-toolchain@1.65.0 - run: | sed -i 's/proc-macro2 = { workspace = true/proc-macro2 = { version = "1"/' serde_derive*/Cargo.toml sed -i 's/quote = { workspace = true/quote = { version = "1"/' serde_derive*/Cargo.toml diff --git a/README.md b/README.md index bf83d766..ab4500ab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Serde   [![Build Status]][actions] [![Latest Version]][crates.io] [![serde msrv]][Rust 1.56] [![serde_derive msrv]][Rust 1.61] +# Serde   [![Build Status]][actions] [![Latest Version]][crates.io] [![serde msrv]][Rust 1.56] [![serde_derive msrv]][Rust 1.65] [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 @@ -6,8 +6,8 @@ [crates.io]: https://crates.io/crates/serde [serde msrv]: https://img.shields.io/crates/msrv/serde.svg?label=serde%20msrv&color=lightgray [serde_derive msrv]: https://img.shields.io/crates/msrv/serde_derive.svg?label=serde_derive%20msrv&color=lightgray -[Rust 1.56]: https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html -[Rust 1.61]: https://blog.rust-lang.org/2022/05/19/Rust-1.61.0.html +[Rust 1.56]: https://blog.rust-lang.org/2021/10/21/Rust-1.56.0/ +[Rust 1.65]: https://blog.rust-lang.org/2022/11/03/Rust-1.65.0/ **Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.** diff --git a/serde/build.rs b/serde/build.rs index fa0fd5a0..7ee4cd43 100644 --- a/serde/build.rs +++ b/serde/build.rs @@ -45,8 +45,8 @@ fn main() { println!("cargo:rustc-check-cfg=cfg(no_target_has_atomic)"); } - // Current minimum supported version of serde_derive crate is Rust 1.61. - if minor < 61 { + // Current minimum supported version of serde_derive crate is Rust 1.65. + if minor < 65 { println!("cargo:rustc-cfg=no_serde_derive"); } diff --git a/serde_core/build.rs b/serde_core/build.rs index 9a33ab30..d3a0b317 100644 --- a/serde_core/build.rs +++ b/serde_core/build.rs @@ -65,17 +65,17 @@ fn main() { } } - // Current minimum supported version of serde_derive crate is Rust 1.61. - if minor < 61 { - println!("cargo:rustc-cfg=no_serde_derive"); - } - // Support for core::ffi::CStr and alloc::ffi::CString stabilized in Rust 1.64. // https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#c-compatible-ffi-types-in-core-and-alloc if minor < 64 { println!("cargo:rustc-cfg=no_core_cstr"); } + // Current minimum supported version of serde_derive crate is Rust 1.65. + if minor < 65 { + println!("cargo:rustc-cfg=no_serde_derive"); + } + // Support for core::num::Saturating and std::num::Saturating stabilized in Rust 1.74 // https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html#stabilized-apis if minor < 74 { diff --git a/serde_derive/Cargo.toml b/serde_derive/Cargo.toml index 88f8f6a4..a4ff185d 100644 --- a/serde_derive/Cargo.toml +++ b/serde_derive/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["serde", "serialization", "no_std", "derive"] license = "MIT OR Apache-2.0" readme = "crates-io.md" repository = "https://github.com/serde-rs/serde" -rust-version = "1.61" +rust-version = "1.65" [features] default = [] diff --git a/serde_derive_internals/Cargo.toml b/serde_derive_internals/Cargo.toml index abcc11dd..ab696c62 100644 --- a/serde_derive_internals/Cargo.toml +++ b/serde_derive_internals/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://serde.rs" keywords = ["serde", "serialization"] license = "MIT OR Apache-2.0" repository = "https://github.com/serde-rs/serde" -rust-version = "1.61" +rust-version = "1.65" [lib] path = "lib.rs"