fix(specs): a capitalised Const in 24 quoted types, against 374 lowercase (+6) - #3363
Merged
Conversation
gHashTag
enabled auto-merge (squash)
September 6, 2026 05:47
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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 #3362
Twelve specs write their field types as quoted strings with a capitalised keyword:
The compiler strips the quotes and emits the content as a type, so rustc receives
Vec<Const u8>and refuses it.Why this is corrected rather than referred to you. The correct spelling
[]constappears 374 times in the same corpus; the capitalised form appears 24. That is a case typo in a keyword, not a semantic choice — there is no reading under whichConstmeans something other thanconsthere, and the corpus settles the spelling 374 to 24. Where a spec question has actually been a design decision ([]u32 = "[2, 2]", the empty field types, the Verilog entry-point contract) I have left it with you and said so.Priced by hand first, on a sample of six: four compiled once corrected. Measured after, over the whole corpus: 346 → 352, zero regressions — two more than the sample predicted, because
aho_corasickandregexalso cleared.The matcher is narrowed to
[]Const. A blanketConst→constwould have corruptedKwConst = 1incompiler/lexer.t27— a legitimate enum variant and the 25th occurrence. Verified intact afterwards.htmlandxmlkeep failing onstd.StringHashMap(...), a Zig standard-library type also written as a string. Different defect, untouched.