Repository navigation
fix(rust): preserve writes to by-value parameter bindings - #5911
Merged
dmitrii-f-t27 merged 6 commits intoOct 4, 2026
Merged
Conversation
Preserve value and reference types, caller copy semantics and lexical shadows. Add a source-first regression with real generated Rust execution and mutation. Update FROZEN_HASH deliberately for this candidate compiler snapshot so the build guard can verify it; M3 remains blocked by the unchanged-baseline Lean classifier disagreement and this candidate is not a completed GOLD ring. Closes gHashTag#5901 Refs gHashTag#5910
This was referenced Oct 4, 2026
Merged
This was referenced Oct 4, 2026
Merged
This was referenced Oct 4, 2026
dmitrii-f-t27
marked this pull request as ready for review
October 4, 2026 08:23
This was referenced Oct 4, 2026
Closed
This was referenced Oct 4, 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.
Writing a by-value scalar or fixed-array parameter previously produced immutable Rust bindings and E0384/E0594. Generation now adds
mutonly to parameter bindings that the body writes, respecting local and loop-capture shadows. Argument types, reference parameters and caller copy semantics are preserved.The source fixture exercises eight functions and nine assertions. Real generated Rust is compiled and executed across 256 scalar inputs and 16 array/counter cases; reference writes, copy semantics and meaningful negative mutations are checked. A separate collection-capture check verifies generation scope only. The tri-net Rust corpus improves from89/102 to96/102, with no newly failing module.
Validation:
tri parse, typecheck and the new fixture's native seal verification pass. C and Zig each execute all9 source checks.mutand whitespace changes; comments, bodies, argument types, spec/C/Zig/Verilog hashes and alias/module identities stay identical. The full seal coverage gate passes:1449 seals,1325 hold,124 known-broken; its debt ledger is unchanged.Those23 specs have existing backend debt: orphan_detection passes6/6 native tests, while22 have Zig compilation blockers now recorded explicitly. Their raw standalone Rust modules still fail for inherited reasons; the comparison adds no new diagnostic class. The seal refresh certifies current generated hashes and records these limitations; it does not certify successful Rust compilation or blocked tests.
Current canonical and merged candidate reproduce the same two advisory failures: ring096 signature drift and FPGA conformance178 elaboration diagnostic lines against ledger176. All37 actual generated Verilog artifacts are byte-identical between them. The real checks and debt ledgers stay unchanged.
Closes #5901