feat: upgrade to Rust edition 2024, resolve TODOs, add rustdoc CI#143
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #142
Migrate to Rust edition 2024 (stable since 1.85) with zero code changes required. Fix documentation inaccuracies and remove stale TODO comments. Changes: - Upgrade edition 2021 → 2024, MSRV 1.70 → 1.85 - Fix CONTRIBUTING.md: "nightly toolchain" → "stable toolchain" - Fix rust/README.md: install version 0.4 → 0.5 - Remove stale TODO comments from imp.rs - Regenerate Cargo.lock to match version 0.5.0 - Add case study for issue #142 audit findings - Add changelog fragment Closes #142 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:Claude Opus 4.6:
Total: (91.3K + 4.9M cached) input tokens, 18.1K output tokens, $3.482209 cost Claude Haiku 4.5: Total: (102.9K + 216.3K cached) input tokens, 6.3K / 64K (10%) output tokens, $0.179241 cost 🤖 Models used:
📎 Log file uploaded as Gist (1484KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit 5859b6d.
|
TODO cannot be just removed - we should either implement them in this pull request, or create issues for the future. Double check if it possible to increase tests coverage and docs coverage. And also if it possible to make automated documentation generation as we do for C#, so the final website published in GitHub Pages contains generated documentation for all supported languages. Also code should contain all comments necessary to generate high quality documentation. Also no tests should be in src folder, use tests folder for tests. |
|
🤖 AI Work Session Started Starting automated work session at 2026-04-11T02:30:16.870Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
- Implement `for_each_integer_type!` macro (resolves TODO "Create macro foreach") - Document IDE alias design decision in LinkReference (resolves TODO "Not use alias") - Move all tests from src/imp.rs to tests/traits.rs (integration tests) - Add 8 new tests (ToPrimitive, PrimInt ops, FromPrimitive, Send+Sync, Display, Hash) - Add crate-level documentation in lib.rs with trait summary table - Add deploy-rust-docs.yml workflow for automated docs on GitHub Pages - Update case study with new findings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $2.627869📊 Context and tokens usage:
Total: (78.0K + 3.1M cached) input tokens, 23.9K output tokens, $2.627869 cost 🤖 Models used:
📎 Log file uploaded as Gist (1157KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Generated documentation deploy should be done only if release of new version is successful, so it should be integrated to main rust workflow. |
|
🤖 AI Work Session Started Starting automated work session at 2026-04-11T05:39:13.473Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Move rustdoc generation and GitHub Pages deployment from a separate deploy-rust-docs.yml workflow into the main rust.yml pipeline as a deploy-docs job that runs only after a successful release (auto-release or manual-release), matching the project's release-driven docs strategy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Accurately describe TODO resolution (implemented, not removed), add entries for new tests, docs deployment, and test restructuring. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $2.569131📊 Context and tokens usage:Claude Opus 4.6:
Total: (62.5K + 3.6M cached) input tokens, 11.8K output tokens, $2.460475 cost Claude Haiku 4.5: Total: (47.2K + 281.4K cached) input tokens, 4.4K / 64K (7%) output tokens, $0.108656 cost 🤖 Models used:
📎 Log file uploaded as Gist (1917KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Summary
Comprehensive audit of the Rust codebase per issue #142, confirming no non-stable features are used and upgrading to the latest Rust edition and best practices.
Changes
for_each_integer_type!macro — resolves the original// TODO: Create macro foreachby DRYing up repetitive per-type macro invocations// TODO: Not use aliasby adding a# Design notein theLinkReferencedoc comment explaining why supertraits are listed explicitlytests/directory — all unit tests moved fromsrc/imp.rstorust/tests/traits.rsas proper integration testsToPrimitive,PrimIntoperations,FromPrimitive,Send + Sync,Display,Hash, and overflow scenarios (total: 75 integration + 6 doc = 81 tests)//!docs inlib.rswith trait summary table and usage exampledeploy-docsjob torust.ymlthat generatescargo docand deploys to therust/subdirectory ongh-pagesonly after a successful release (matching the project's release-driven docs strategy)deploy-rust-docs.yml— docs deployment is now part of the main Rust CI/CD pipeline0.4instead of current0.50.4.0instead of0.5.0docs/case-studies/issue-142/Audit Results
num-traits 0.2.19is latestrust.yml(runs after release)Fixes #142
Test plan
cargo fmt --check— cleancargo clippy --all-targets --all-features— zero warningscargo test --all-features— 75 integration + 6 doc tests passcargo doc --no-deps— documentation generates successfullysrc/folder🤖 Generated with Claude Code