Repository navigation
fix(rust): a dotted foreign type has no Rust spelling either (+23, 0 regressions) - #3220
Merged
Merged
Conversation
…regressions) `param_type_to_c` opens with this arm -- a dotted foreign type has no C spelling, and `void*` is "the honest lowering and what a hand-written binding uses". `t27_type_to_rust` never got one, so the path arrived verbatim and rustc stopped at the first dot, `pub allocator: std.mem.Allocator,`, without reading the rest of the file. One field accounted for 15 of the 24 specs in the class; 34 corpus specs declare it. Rust's `void*` is `*mut ()` and needs no import. Measured by name over all 650 corpus specs: rustc accepts 252 -> 275, +23, zero regressions. Also records why two predictions this pass were both far too low (0-2 vs 10, 4-8 vs 23). A signature-level fix clears a file only when nothing else is wrong with it, which is when its bodies are stubs: 44 of 44 stub functions among #3216's gainers, 100 of 100 among these. The predictor is the class's stub-bodied share, not the depth of the error queue. Corpus-wide stubs are 8%, a different population. Seal and 47 drifted seals move in the same commit. Closes #3219 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
September 5, 2026 01:10
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.
param_type_to_canswers this in its very first arm:t27_type_to_rustnever got one, so the path arrived verbatim and rustc stopped atthe first dot —
pub allocator: std.mem.Allocator,— and never read the rest of thefile. One field accounted for 15 of the 24 specs in the class; 34 corpus specs
declare it. Rust's
void*is*mut (), and it needs no import.Fourth instance this pass of one shape: a rule that exists in one emitter and never
travelled to its sibling — after #3208, #3213 and #3216.
Measured, 650 corpus specs, by name
Why my two previous predictions were both far too low
I predicted 0–2 for #3216 and got 10; I predicted 4–8 here and got 23. Both
under, and the reason is now measured rather than guessed.
A signature-level fix clears a whole file only when the file has nothing else wrong,
and that is exactly the case when its bodies are stubs. Measured over the specs
each fix unblocked:
So the predictor is not "how deep do errors queue" — it is what fraction of the
class's specs are stub-bodied, because a signature fix cannot help a real body that
has further defects. Corpus-wide only 8% of functions are stubs, which is a different
population and does not bear on this.
Closes #3219