From e4c3df507f190725c1b48463bb9507980d705475 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 28 Dec 2025 05:23:45 +0100 Subject: [PATCH 1/3] Initial commit with task details Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Numbers/issues/125 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..a0e6c9d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Numbers/issues/125 +Your prepared branch: issue-125-f599b5d2205c +Your prepared working directory: /tmp/gh-issue-solver-1766895824380 + +Proceed. \ No newline at end of file From b8a54505b7b718b9669352605e5a8fb30ea18cb9 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 28 Dec 2025 05:30:42 +0100 Subject: [PATCH 2/3] Migrate Rust code to latest stable toolchain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unstable feature flags (#![feature(step_trait)] and #![feature(trait_alias)]) - Remove Step trait bound from LinkType (required for stable Rust - Step is still unstable) - Update Rust edition from 2018 to 2021 - Update rust-toolchain.toml from nightly-2022-08-22 to stable - Update num-traits dependency from 0.2.14 to 0.2.19 - Set minimum Rust version (MSRV) to 1.70 - Update CI workflow to use dtolnay/rust-toolchain@stable BREAKING CHANGE: LinkType trait no longer requires Step bound. This is necessary because std::iter::Step remains unstable (rust-lang/rust#42168). Fixes #125 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/rust.yml | 22 +++++-------------- .../20251228_053006_migrate_to_stable_rust.md | 16 ++++++++++++++ rust/Cargo.lock | 2 +- rust/Cargo.toml | 7 +++--- rust/rust-toolchain.toml | 3 ++- rust/src/imp.rs | 3 --- rust/src/lib.rs | 3 --- 7 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 changelog.d/20251228_053006_migrate_to_stable_rust.md diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c831ee0..885b3de 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -54,9 +54,8 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2022-08-22 components: rustfmt - name: Setup Node.js @@ -94,9 +93,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2022-08-22 + uses: dtolnay/rust-toolchain@stable - name: Cache cargo registry uses: actions/cache@v4 @@ -120,9 +117,8 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2022-08-22 components: llvm-tools-preview - name: Cache cargo registry @@ -157,9 +153,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2022-08-22 + uses: dtolnay/rust-toolchain@stable - name: Cache cargo registry uses: actions/cache@v4 @@ -227,9 +221,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2022-08-22 + uses: dtolnay/rust-toolchain@stable - name: Setup Node.js uses: actions/setup-node@v4 @@ -314,9 +306,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2022-08-22 + uses: dtolnay/rust-toolchain@stable - name: Setup Node.js uses: actions/setup-node@v4 diff --git a/changelog.d/20251228_053006_migrate_to_stable_rust.md b/changelog.d/20251228_053006_migrate_to_stable_rust.md new file mode 100644 index 0000000..a3d9307 --- /dev/null +++ b/changelog.d/20251228_053006_migrate_to_stable_rust.md @@ -0,0 +1,16 @@ +--- +bump: minor +--- + +### Changed +- Migrated from nightly Rust (nightly-2022-08-22) to stable Rust toolchain +- Updated Rust edition from 2018 to 2021 +- Updated `num-traits` dependency from 0.2.14 to 0.2.19 +- Set minimum Rust version (MSRV) to 1.70 + +### Removed +- **BREAKING**: Removed `Step` trait bound from `LinkType` trait + - The `std::iter::Step` trait remains unstable in Rust (tracking issue #42168) + - Types implementing `LinkType` no longer need to implement `Step` + - This is required for stable Rust compatibility +- Removed `#![feature(step_trait)]` and `#![feature(trait_alias)]` feature flags diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e618171..f11f6d6 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ [[package]] name = "platform-num" -version = "0.1.0" +version = "0.2.0" dependencies = [ "num-traits", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index d58f98d..979167c 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "platform-num" -version = "0.1.0" -edition = "2018" +version = "0.2.0" +edition = "2021" +rust-version = "1.70" authors = ["uselesssgoddess", "Linksplatform Team "] license = "LGPL-3.0" repository = "https://github.com/linksplatform/Numbers" @@ -18,7 +19,7 @@ name = "platform_num" path = "src/lib.rs" [dependencies] -num-traits = "0.2.14" +num-traits = "0.2.19" [profile.release] lto = true diff --git a/rust/rust-toolchain.toml b/rust/rust-toolchain.toml index d7c5705..e8c2360 100644 --- a/rust/rust-toolchain.toml +++ b/rust/rust-toolchain.toml @@ -1,2 +1,3 @@ [toolchain] -channel = "nightly-2022-08-22" +channel = "stable" +components = ["rustfmt"] diff --git a/rust/src/imp.rs b/rust/src/imp.rs index 9c669f3..d3f33cc 100644 --- a/rust/src/imp.rs +++ b/rust/src/imp.rs @@ -1,6 +1,5 @@ use std::fmt::{Debug, Display}; use std::hash::Hash; -use std::iter::Step; use num_traits::{AsPrimitive, FromPrimitive, PrimInt, Signed, ToPrimitive, Unsigned}; @@ -74,7 +73,6 @@ max_value_impl!(usize); pub trait LinkType: Num + Unsigned -+ Step + ToSigned + MaxValue + FromPrimitive @@ -89,7 +87,6 @@ Num impl< All: Num + Unsigned - + Step + ToSigned + MaxValue + FromPrimitive diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 66dbe9d..6f429d1 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -1,6 +1,3 @@ -#![feature(step_trait)] -#![feature(trait_alias)] - mod imp; pub use imp::{LinkType, MaxValue, Num, SignNum, ToSigned}; From aa87f803af99574eb3311ca73a8aaf07297de293 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 28 Dec 2025 05:33:13 +0100 Subject: [PATCH 3/3] Revert "Initial commit with task details" This reverts commit e4c3df507f190725c1b48463bb9507980d705475. --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index a0e6c9d..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Numbers/issues/125 -Your prepared branch: issue-125-f599b5d2205c -Your prepared working directory: /tmp/gh-issue-solver-1766895824380 - -Proceed. \ No newline at end of file