Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions changelog.d/20251228_053006_migrate_to_stable_rust.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <linksplatformtechnologies@gmail.com>"]
license = "LGPL-3.0"
repository = "https://github.com/linksplatform/Numbers"
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion rust/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[toolchain]
channel = "nightly-2022-08-22"
channel = "stable"
components = ["rustfmt"]
3 changes: 0 additions & 3 deletions rust/src/imp.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down Expand Up @@ -74,7 +73,6 @@ max_value_impl!(usize);
pub trait LinkType:
Num
+ Unsigned
+ Step
+ ToSigned
+ MaxValue
+ FromPrimitive
Expand All @@ -89,7 +87,6 @@ Num
impl<
All: Num
+ Unsigned
+ Step
+ ToSigned
+ MaxValue
+ FromPrimitive
Expand Down
3 changes: 0 additions & 3 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#![feature(step_trait)]
#![feature(trait_alias)]

mod imp;

pub use imp::{LinkType, MaxValue, Num, SignNum, ToSigned};
Loading