Bump Rust nightly to nightly-2026-04-11#3782
Merged
Conversation
Extract the proof-building closure body into a separate find_proof_internal() static method, avoiding the RPIT + const-generic + closure-capturing-self combination that triggers an ICE on nightly-2026-04-11.
Features stabilized and removed: array_windows, assert_matches, if_let_guard, const_try, maybe_uninit_slice, maybe_uninit_write_slice, vec_into_raw_parts, trusted_len, int_roundings, iter_collect_into, impl_trait_in_assoc_type, type_alias_impl_trait, box_into_inner, more_qualified_paths, try_blocks (where unused), portable_simd (where unused). Features now conditionally gated via cfg_attr: variant_count (test/fuzz only), portable_simd (alloc/test only in subspace-proof-of-space), exact_size_is_empty (parallel only), sync_unsafe_cell (parallel only), get_mut_unchecked and maybe_uninit_fill (alloc only). Also update assert_matches import path from std::assert_matches::assert_matches to std::assert_matches (the module was removed; the macro is now re-exported directly).
- manual_saturating_arithmetic: use saturating_sub() instead of checked_sub().unwrap_or_default() - unfulfilled_lint_expectations: remove #[expect(clippy::double_parens)] no longer needed by construct_uint! macro - collapsible_match: collapse if-in-match to match guards - unnecessary_sort_by: use sort_unstable_by_key - useless_conversion: remove redundant .into_iter() calls - unnecessary_cast: remove u32-to-u32 casts - explicit_counter_loop: use zip with range instead of manual counters - result_large_err: allow on RPC builder closures returning sc_service::Error - try block type inference: add explicit .map_err() for ReadingError->ProvingError conversion (new nightly no longer infers From in try blocks)
Bumps subspace-v14 to include the wasm_import_module = "env" fix that explicitly marks runtime-interface host function imports for wasm-ld. Needed because Rust PR #149868 stopped passing --allow-undefined to wasm-ld, which previously masked these undefined symbols. Verified byte-identical runtime_version and runtime_apis custom sections compared to the previous build, preserving runtime upgrade and client compatibility.
🛡️ Immunefi PR ReviewsWe noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below: Once submitted, we'll take care of assigning a reviewer and follow up here. |
nazar-pc
previously approved these changes
Apr 17, 2026
nazar-pc
previously approved these changes
Apr 17, 2026
- Gate #![feature(portable_simd)] in subspace-verification behind the kzg feature to match the cfg-gate on the Simd usage site. The new nightly's unused_features lint flagged the declared-but-not-used case when the crate is checked standalone (without kzg). - Fix unnecessary_sort_by clippy lint in rocm.rs (parallel to the earlier cuda.rs fix). CI exercises ROCm features only on Linux/Windows, so this path wasn't reached by local macOS clippy.
nazar-pc
approved these changes
Apr 17, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bumps Rust nightly from
nightly-2025-10-19tonightly-2026-04-11— a ~6-month hygiene update aligning with the Abundance project. All Rust code changes and a one-line fix in the polkadot-sdk fork are required for compilation to succeed on the new nightly.Commits
Reviewers are encouraged to go commit-by-commit.
de946fda2— update Rust nightly to nightly-2026-04-11Updates
rust-toolchain.tomlfromnightly-2025-10-19tonightly-2026-04-11.633381ae2— fix compiler ICE in subspace-proof-of-space find_proofThe
find_proof()function incrates/subspace-proof-of-space/src/chiapos/tables.rstriggered a compiler ICE due to thegeneric_const_exprs+ RPIT + closure-capturing-self combination. Refactored to extract the per-proof logic into a separate non-generic helper method, following Abundance's pattern.40659bfdf— remove stabilized feature gates for nightly-2026-04-11Removes
#![feature(...)]declarations for features stabilized in the 6-month nightly gap:array_windows,maybe_uninit_slice,maybe_uninit_write_slice,vec_into_raw_parts,assert_matches,if_let_guard,const_try,trusted_len,int_roundings,iter_collect_into,impl_trait_in_assoc_type,type_alias_impl_trait,box_into_inner. Updatesassert_matchesimports to the stabilized path.d4303e640— fix new clippy lints and try block inference for nightly-2026-04-11clippy::manual_saturating_arithmeticin archiverclippy::collapsible_match,unnecessary_sort_by,useless_conversion,unnecessary_cast,explicit_counter_loopunfulfilled_lint_expectations: removed stale#[expect(clippy::double_parens)]clippy::result_large_err:#[expect]for substrate-originating error types.map_err(ProvingError::RecordReadingError)forReadingErrorconversions inproving.rs43756be00— fix additional stabilized features and clippy lints for nightly-2026-04-11Additional stabilized features missed in the first pass:
trait_alias,type_changing_struct_update, and conditional gating ofmore_qualified_pathsto#[cfg_attr(test, ...)]. Re-addediter_collect_into(not actually stabilized) andnever_typetosubspace-farmer-components(still required). Additionalresult_large_errfixes insubspace-test-serviceandsubspace-farmerless-dev-node. Rewrotealice_nonceloop in fraud-proof tests to avoidexplicit_counter_loop.e729fafb8— update polkadot-sdk fork rev for WASM linker fixRust PR #149868 (merged April 4, 2026) stopped passing
--allow-undefinedtowasm-ldon WASM targets. This broke WASM runtime linking for all bareextern "C"host function declarations generated by the#[runtime_interface]proc macro.Fork fix (commit) adds
#[cfg_attr(target_family = "wasm", link(wasm_import_module = "env"))]to the generatedextern "C"block insp-runtime-interface-proc-macro. This explicitly marks the imports as WASM imports from the"env"module, matching what the Substrate executor already expects.Verified to produce byte-identical
runtime_versionandruntime_apiscustom sections compared to the previous behavior, preserving runtime upgrade and client compatibility. Verification steps performed:"env"moduleruntime_versionandruntime_apiscustom sections: byte-identical"env"module and rejects anything elsec3851a0db— cargo fmt fixes for nightly-2026-04-11Formatting adjustments from rustfmt on the new nightly.
Code contributor checklist