From 14a12df196f188d44e17e02e49ea53437d84fd4e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 20 Jul 2026 17:19:14 -0700 Subject: [PATCH 1/5] Upgrade to `syn v3` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4a13a07..7365772 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ rust-version = "1.56.0" [dependencies] proc-macro2 = "1" quote = "1" -syn = "2.0.5" +syn = "3" [dev-dependencies] num = "0.4" From 8087623459ed7d17d91b9a60abaa257fa6c4dd74 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 20 Jul 2026 17:27:31 -0700 Subject: [PATCH 2/5] Raise the MSRV to 1.71 (like syn) --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/main.yaml | 2 +- .github/workflows/pr.yaml | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- ci/check/Cargo.toml | 4 ++-- ci/import/Cargo.toml | 3 +-- ci/rustup.sh | 2 +- ci/test_full.sh | 2 +- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 14a154a..8761e74 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [1.56.0, stable, beta, nightly] + rust: [1.71.0, stable, beta, nightly] steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.70.0 + - uses: dtolnay/rust-toolchain@1.71.0 with: components: rustfmt - run: cargo fmt --all --check diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e181a3d..31b6fc6 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [1.56.0, stable] + rust: [1.71.0, stable] steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 1cadac0..ad7c112 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [1.56.0, stable] + rust: [1.71.0, stable] steps: - uses: actions/checkout@v4 - uses: actions/cache@v4 diff --git a/Cargo.toml b/Cargo.toml index 7365772..0b067ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ version = "0.4.2" readme = "README.md" exclude = ["/ci/*", "/.github/*"] edition = "2021" -rust-version = "1.56.0" +rust-version = "1.71.0" [dependencies] proc-macro2 = "1" diff --git a/README.md b/README.md index 302b0d0..bc08877 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![crate](https://img.shields.io/crates/v/num-derive.svg)](https://crates.io/crates/num-derive) [![documentation](https://docs.rs/num-derive/badge.svg)](https://docs.rs/num-derive) -[![minimum rustc 1.56](https://img.shields.io/badge/rustc-1.56+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) +[![minimum rustc 1.71](https://img.shields.io/badge/rustc-1.71+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) [![build status](https://github.com/rust-num/num-derive/actions/workflows/main.yaml/badge.svg)](https://github.com/rust-num/num-derive/actions/workflows/main.yaml) Procedural macros to derive numeric traits in Rust. @@ -51,7 +51,7 @@ Release notes are available in [RELEASES.md](RELEASES.md). ## Compatibility -The `num-derive` crate is tested for rustc 1.56 and greater. +The `num-derive` crate is tested for rustc 1.71 and greater. ## License diff --git a/ci/check/Cargo.toml b/ci/check/Cargo.toml index 573bbc9..3404b22 100644 --- a/ci/check/Cargo.toml +++ b/ci/check/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "check" version = "0.1.0" -authors = ["Josh Stone "] edition = "2018" -rust-version = "1.56.0" +rust-version = "1.71.0" +publish = false [dependencies.num-derive] path = "../.." diff --git a/ci/import/Cargo.toml b/ci/import/Cargo.toml index 303d1d0..3aebf5c 100644 --- a/ci/import/Cargo.toml +++ b/ci/import/Cargo.toml @@ -1,10 +1,9 @@ [package] name = "import" version = "0.0.1" -authors = ["jean-airoldie <25088801+jean-airoldie@users.noreply.github.com>"] edition = "2018" +rust-version = "1.71.0" publish = false -rust-version = "1.56.0" [dependencies] num-derive = { path = "../.." } diff --git a/ci/rustup.sh b/ci/rustup.sh index 5289138..461e552 100755 --- a/ci/rustup.sh +++ b/ci/rustup.sh @@ -5,6 +5,6 @@ set -ex ci=$(dirname $0) -for version in 1.56.0 stable beta nightly; do +for version in 1.71.0 stable beta nightly; do rustup run "$version" "$ci/test_full.sh" done diff --git a/ci/test_full.sh b/ci/test_full.sh index ddbafcf..903ff80 100755 --- a/ci/test_full.sh +++ b/ci/test_full.sh @@ -3,7 +3,7 @@ set -e CRATE=num-derive -MSRV=1.56 +MSRV=1.71 get_rust_version() { local array=($(rustc --version)); From 250c1325b0b97e9ef1be289d5cf1138bc410036f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 20 Jul 2026 17:30:09 -0700 Subject: [PATCH 3/5] Stop caching the registry --- .github/workflows/ci.yaml | 5 ----- .github/workflows/main.yaml | 5 ----- .github/workflows/pr.yaml | 5 ----- 3 files changed, 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8761e74..d2469e1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,11 +11,6 @@ jobs: rust: [1.71.0, stable, beta, nightly] steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 - if: startsWith(matrix.rust, '1') - with: - path: ~/.cargo/registry/index - key: cargo-${{ matrix.rust }}-git-index - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 31b6fc6..ac37353 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -16,11 +16,6 @@ jobs: rust: [1.71.0, stable] steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 - if: startsWith(matrix.rust, '1') - with: - path: ~/.cargo/registry/index - key: cargo-${{ matrix.rust }}-git-index - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ad7c112..a7af211 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -12,11 +12,6 @@ jobs: rust: [1.71.0, stable] steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 - if: startsWith(matrix.rust, '1') - with: - path: ~/.cargo/registry/index - key: cargo-${{ matrix.rust }}-git-index - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} From 95530299546131ccbd6cca91866b89a67f5a8980 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 20 Jul 2026 17:33:13 -0700 Subject: [PATCH 4/5] Release 0.5.0 --- Cargo.toml | 2 +- README.md | 2 +- RELEASES.md | 7 +++++++ src/lib.rs | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0b067ca..532017f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ categories = [ "science" ] license = "MIT OR Apache-2.0" name = "num-derive" repository = "https://github.com/rust-num/num-derive" -version = "0.4.2" +version = "0.5.0" readme = "README.md" exclude = ["/ci/*", "/.github/*"] edition = "2021" diff --git a/README.md b/README.md index bc08877..b36c8ce 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] num-traits = "0.2" -num-derive = "0.4" +num-derive = "0.5" ``` and this to your crate root: diff --git a/RELEASES.md b/RELEASES.md index bbf6d53..dead040 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,10 @@ +# Release 0.5.0 (2026-07-20) + +- [Upgrade to `syn v3`.][71] + - This raises the minimum supported rustc to 1.71. + +[71]: https://github.com/rust-num/num-derive/pull/71 + # Release 0.4.2 (2024-02-06) - [Use anon-const to avoid RFC 3373 warnings.][62] diff --git a/src/lib.rs b/src/lib.rs index 207602b..29fd3d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ //! ```toml //! [dependencies] //! num-traits = "0.2" -//! num-derive = "0.3" +//! num-derive = "0.5" //! ``` //! //! Then you can derive traits on your own types: From cab6df7118b1c396bef33bdd906c98b3b6df2733 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 20 Jul 2026 17:34:32 -0700 Subject: [PATCH 5/5] Remove the stale html_root_url --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 29fd3d6..49750c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,6 @@ // except according to those terms. #![crate_type = "proc-macro"] -#![doc(html_root_url = "https://docs.rs/num-derive/0.3")] #![recursion_limit = "512"] //! Procedural macros to derive numeric traits in Rust.