Skip to content

fix(rust): an array literal where a Vec is declared is a vec! - #3350

Merged
gHashTag merged 1 commit into
masterfrom
array-literal-into-vec
Sep 6, 2026
Merged

fix(rust): an array literal where a Vec is declared is a vec!#3350
gHashTag merged 1 commit into
masterfrom
array-literal-into-vec

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Closes #3349

The headline is the measurement, not the fix. Three emitter repairs in a row measured +0 on the Rust column while demonstrably correcting the emission. The reason is structural and had never been measured.

Real rustc errors per failing spec, over 243:

errors specs
1 55
2 38
3 19
4 17
5+ 114

Median 4. A fix flips a spec to OK only when it closes that spec's last error, so targeting the largest first-error class is the wrong rule — the big classes are spread across specs that each carry several more defects. The right target is the class that is the sole error in one of the 55: expected one of … 7, cannot find type 7, mismatched types 5, expected type, found keyword 5, use of moved value 3.

The count had to be taken twice. grep -cE '^error' also matches error: aborting due to N previous errors, which inflates every bucket by one and turns 55 specs with one error into zero specs with one error — the exact opposite conclusion, and the one I wrote down first.

The fix itself is narrow: var xs : []u32 = []; maps its type to Vec<u32> and emits its value as []. Nine of the twenty mismatched types first-errors are that pair. This closes the local position, the only one of its three with an unambiguous answer; return [] and pub const N: Vec<u32> = [...] are the other two, and a Vec cannot be a constant in Rust at all — that one is a question about the type mapping, not about the line.

Measured, two pinned binaries of distinct hashes: 338 both sides, zero regressions, first error moved on 1 of 14. One predicate, two call sites — gen_fn carries its own copy of the local-emission logic, as #3341 found the hard way.

@gHashTag
gHashTag enabled auto-merge (squash) September 6, 2026 04:01
@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 04:01:30 UTC

Summary

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=824bbbc7859f != 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 b0cbc32 into master Sep 6, 2026
30 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.

Why three correct fixes moved the column by zero: no failing spec had one error, and 55 of them do

1 participant