fix(rust): escape a keyword used as an enum variant or a function name (+2) - #3348
Merged
Conversation
gHashTag
enabled auto-merge (squash)
September 6, 2026 02:45
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-09-06 03:19:09 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-09-06 03:27:25 UTC
Summary
Seal Status
|
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 #3347
The Zig emitter escapes enum variant names and says why, in a comment one line above its own call to
zig_ident. The rule did not travel to Rust — and it had never reached the function name itself either.rust_identalready escaped struct fields, parameters, struct-literal fields and field access. Two positions were missing:Measured: 336 → 338, zero regressions.
tri/collections/variant.t27andtri/net/async.t27compile now. The two enum-variant specs still fail, on causes that changed —expected identifier, found keywordbecamein expressions, \_` can only be used on…andexpected expression, found `]`` — which is how the fix was confirmed there rather than assumed.How it was found, and two corrections to the instrument that found it:
aborting due to N previous errorsas an error line, so a naive count of distinct classes said no spec was one fix away. Excluding the summary line, 95 are.