Skip to content

fix(rust): map a tuple element by element - #3346

Merged
gHashTag merged 2 commits into
masterfrom
tuple-types-are-mapped
Sep 6, 2026
Merged

fix(rust): map a tuple element by element#3346
gHashTag merged 2 commits into
masterfrom
tuple-types-are-mapped

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Closes #3345

The Rust type mapper had no arm for a tuple. (A, B) fell through to the default and was emitted as written, so an inner []f32 — which every other position maps to Vec<f32> — reached rustc as []f32. The rule existed and did not travel into this position.

Measured: 3 specs emit -> (...[]...) with the old binary, 0 with the new one. The class is closed.

+0 on the column, stated plainly. All three still fail, on other defects. Two of the three changed their failure cause, which is how the fix was confirmed rather than assumed. Zero regressions: 336 / 245 / 69 before and after.

My first count of the class was 6 and it was wrong. The matcher \(\s*\[\] also caught std.StringHashMap([]Const u8) and std.HashMap(T, []T) — Zig standard-library types leaking into the Rust output, not tuples at all. That is a separate and larger class: 8 specs, recorded for the next pass.

The split is depth-aware: a naive split(",") would cut (Map<K, V>, T) into Map<K and V> and produce something worse than the input. Controls: ([]f32, []u8) maps both elements, and the one-element (u32) stays (u32) rather than becoming the one-tuple (u32,), which is a different type.

Found by censusing the first rustc error of all 245 failures together with the generated line — that pairing is what separated four distinct classes hiding inside one error text.

@gHashTag
gHashTag enabled auto-merge (squash) September 6, 2026 02:37
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-06 02:37:49 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 10
PRs with All Checks Green 7
READY 6
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b109be394c52 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-06 03:17:46 UTC

Summary

Status Count
Total Open PRs 18
PRs with Failing Checks 10
PRs with All Checks Green 8
READY 6
FAILING 10
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b109be394c52 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit e23b468 into master Sep 6, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A tuple type is emitted verbatim, so []T inside it never maps to Vec<T>

1 participant