-
Notifications
You must be signed in to change notification settings - Fork 0
chore(toolchain): bump to Rust 1.95.0 (align with bevy + lance-graph) #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Unused / Allow-suppressed Inventory — 1.95 sweep | ||
|
|
||
| > **Captured:** 2026-05-13 while bumping ndarray master to Rust 1.95.0. | ||
| > **Source:** `grep -rn "#\[allow(dead_code\|#\[allow(unused" src/` (lib only). | ||
| > **Purpose:** signal mining — each entry below is a piece of code that | ||
| > compiles but is allowed to be unused. Some are legitimate scaffolding | ||
| > (rayon-gated, no_std polyfill, hot-swap reserves), some are actionable | ||
| > (Rust-1.64 compatibility imports that 1.95 likely doesn't need, phantom | ||
| > tier variants flagged by the round-1 audit fleet). | ||
|
|
||
| ## Categorization | ||
|
|
||
| ### A — Likely actionable (real "API drift" candidates) | ||
|
|
||
| | # | Site | Suppression | Why interesting | | ||
| |---|---|---|---| | ||
| | A1 | `src/impl_owned_array.rs:7` | `unused_imports // Needed for Rust 1.64` | We just bumped to 1.95. The 1.64-era workaround is almost certainly stale. **Action:** remove the suppression, see if the import is still needed; if not, drop it. | | ||
| | A2 | `src/iterators/mod.rs:24` | `unused_imports // Needed for Rust 1.64` | Same as A1. | | ||
| | A3 | `src/hpc/simd_dispatch.rs:47` | `dead_code` on `SimdTier::WasmSimd128` (and likely `Sse2`) | **Flagged by round-1 audit agent #6**: `SimdTier::Sse2` is never selected in `detect()`; no SSE2 wrapper functions exist. Phantom variants. **Action:** delete or wire. | | ||
| | A4 | `src/hpc/clam.rs:928` | `dead_code` | CLAM cluster code. **Action:** verify if the suppressed fn is reachable through any public CLAM call path; if not, delete. | | ||
| | A5 | `src/hpc/clam_compress.rs:141` | `dead_code` | Same family as A4. | | ||
| | A6 | `src/hpc/jitson/scan_config.rs:144` | `dead_code` | jitson scan-config. Probably scaffolding for an unfinished feature; needs PR-author review. | | ||
| | A7 | `src/impl_ref_types.rs:364` | `dead_code` | ndarray ref type helper. | | ||
| | A8 | `src/backend/native.rs:376`, `:423` | `dead_code` (×2) | Backend kernel helpers possibly only used by feature-gated paths. | | ||
| | A9 | `src/hpc/packed.rs:29`, `:42` | `unused_variables` (×2) | Variables defined but unused. Either rename to `_x` for explicit "ignored", or wire them in. | | ||
|
|
||
| ### B — Documented scaffolding (intentional, leave) | ||
|
|
||
| | # | Site | Suppression | Justification | | ||
| |---|---|---|---| | ||
| | B1 | `src/simd.rs:15,31,48,96,110,126,1612,1658,1672` (×9) | `dead_code` | Tier enum variants for cross-arch builds (only some platforms use all variants) + no_std `LazyLock` polyfill helpers. | | ||
| | B2 | `src/split_at.rs:11` | `dead_code // used only when Rayon support is enabled` | Self-documented. | | ||
| | B3 | `src/hpc/jitson_cranelift/engine.rs:130` | `dead_code // retained for future hot-swap / eviction by FuncId` | Self-documented. | | ||
| | B4 | `src/data_repr.rs:11`, `src/data_traits.rs:11`, `src/impl_constructors.rs:37`, `src/impl_methods.rs:13`, `src/free_functions.rs:13`, `src/impl_views/conversions.rs:10` | `unused_imports` | Conditional-cfg imports needed under some feature combinations. | | ||
| | B5 | `src/parallel/mod.rs:120,122` | `unused_imports // used by rustdoc links` | Self-documented. | | ||
| | B6 | `src/simd_neon.rs:1721` | `unused_macros` | NEON macros only used on aarch64. | | ||
| | B7 | `src/zip/mod.rs:424,715` | `dead_code` / `unused` | Zip iterator scaffolding. | | ||
| | B8 | `src/backend/native.rs:20` | `dead_code` | Backend kernel scaffold. | | ||
| | B9 | `src/doc/ndarray_for_numpy_users/mod.rs:750` | `unused_imports` | Doc example. | | ||
| | B10 | `src/itertools.rs:90` | (inside a doc-comment example) | Not real code. | | ||
|
|
||
| ## Suggested follow-ups (post-1.95 bump) | ||
|
|
||
| - **A1, A2 (Rust 1.64 compat sweep):** remove the suppression, attempt build, drop the import if no longer needed. Likely a 2-line change × 2 files. | ||
| - **A3 (phantom SimdTier variants):** the round-1 audit fleet already flagged this. Pair with the round-3 cosmetic-SIMD consumer fleet — they'll touch `simd_dispatch.rs` anyway. | ||
| - **A4, A5 (clam dead_code):** needs domain owner review. Worth flagging in a CLAM-related PR; not urgent. | ||
| - **A6 (jitson scan_config):** check INTEGRATION_PLANS — if jitson is still active, wire; if archived, delete. | ||
| - **A7, A8, A9:** small-scope per-site review; aggregate into a "dead-code cleanup" PR. | ||
|
|
||
| ## What this PR (1.95 bump) does NOT touch | ||
|
|
||
| This file is **signal mining only**. The 1.95 bump PR itself: | ||
| - Bumps `rust-toolchain.toml` → 1.95.0 | ||
| - Bumps `Cargo.toml` `rust-version` → "1.95" | ||
| - Bumps `MSRV` / `BLAS_MSRV` env in ci.yaml → 1.95.0 | ||
| - Fixes the ONE 1.95 clippy lint that fires (`clippy::manual_checked_ops` | ||
| in `impl_owned_array.rs::into_scalar`) | ||
|
|
||
| The 36 suppression sites are pre-existing and persist after the bump. | ||
| Cleaning them up is the follow-up work surfaced by this inventory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| [toolchain] | ||
| channel = "1.94.1" | ||
| # Pinned to 1.94.1 (latest 1.94 patch, 2026-03-25). 1.95 turned several | ||
| # previously-safe patterns into denied lints (e.g. unnecessary_sort_by) | ||
| # without sufficient value to justify the churn — bump explicitly when | ||
| # a future version is reviewed, never auto-track stable. Mirrors the | ||
| # pin in lance-graph, smb-office-rs, and MedCare-rs. | ||
| channel = "1.95.0" | ||
| # Pinned to 1.95.0 (2026-04-14). Aligns ndarray with the rest of the | ||
| # AdaWorldAPI stack: bevy (already on 1.95 for edition 2024) and | ||
| # lance-graph (bumped in parallel). 1.95 introduced one new clippy lint | ||
| # that fires on this codebase (`clippy::manual_checked_ops` on | ||
| # `impl_owned_array.rs::into_scalar`); that's fixed in this same commit. | ||
| # Never auto-track `stable` — bump explicitly when a future version is | ||
| # reviewed and the workspace clippy passes clean. | ||
| components = ["clippy", "rustfmt"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
rust-versionraised to 1.95, the repository Docker builds are now broken: bothDockerfileandDockerfile.avx512still install and assert Rust 1.94.0 before runningcargo build/cargo test, and Cargo will reject this package because its manifest requires rustc 1.95 or newer. This affects anyone using the documenteddocker build -t ndarray-test .or AVX-512 image path; please bump those Dockerfiles alongside the manifest MSRV.Useful? React with 👍 / 👎.