fix(rust): a function type is a type alias, not a const's value - #3365
Open
gHashTag wants to merge 1 commit into
Open
fix(rust): a function type is a type alias, not a const's value#3365gHashTag wants to merge 1 commit into
gHashTag wants to merge 1 commit into
Conversation
gHashTag
enabled auto-merge (squash)
September 6, 2026 06:19
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This was referenced Sep 6, 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.
Closes #3364
The parser has no production for a function type — it swallows the whole text into one
ExprIdentifiernamed"fn ( MiddlewareContext ) bool"— and the const emitter printed it as a value. C emits the same shape and Zig does not generate, so no neighbour answers this one; but nothing is being decided either, because a function type has exactly one Rust spelling and the current output is not an alternative to it.Measured, two pinned binaries of distinct hashes over 650 specs: 352 OK both sides, zero regressions. +0. Exactly one spec changes output,
server/http.t27, and it still fails — onexpected expression, found \@`` underneath.That underneath is the more useful finding.
tri one-awayreported this spec as carrying exactly one error; repairing it revealed the next. rustc abandons a file at the first parse error, so a sole uncoded diagnostic is a floor, not a total — the correction now folded into #3360 before it merges, which turns its headline from 50 into 24 exact and 26 lower bounds.Narrow on purpose:
= fn(...)also spells a closure with a body in two specs; those are values and are left alone.