Repository navigation
Conversation
…them go A declaration sweep driven by D183's lint. Every `.len() as i32` in src/ was stripped (758 sites), and the lint named the declaration each narrowing flowed into: an `i32` parameter, variable or field that holds a length, a mark or an index into a list widens to `isize` (D108, D114) and its casts fall away; one that is stored into an i32 table (the AST, type and MIR arrays, comptime values), passed to the C bridge, or returned as a table id keeps its width, and the cast returns at the value's binding, where it is the real narrowing. About a hundred parameters, six variables and seven fields widened; `check src/main.w` is clean. The census's len-cast count falls 784 -> 617; what remains is the table floor, where the cast says what it means.
ehartford
marked this pull request as ready for review
November 8, 2026 19:42
Contributor
Author
|
Battery GREEN on 481f5a7: |
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 #3073.
A declaration sweep driven by D183's lint. Every
.len() as i32insrc/was stripped (758 sites), and the lint named the declaration each narrowing flowed into: ani32parameter, variable or field that holds a length, a mark or an index into a list widens toisize(D108, D114) and its casts fall away; one that is stored into an i32 table (the AST, type and MIR arrays, comptime values), passed to the C bridge, or returned as a table id keeps its width, and the cast returns at the value's binding, where it is the real narrowing.About a hundred parameters, six variables and seven fields widened;
with check src/main.wis clean. The census'slen-castcount falls 784 → 617; what remains is the table floor, where the cast says what it means. Method and tools are described on #3073.No behavior change intended: a widened parameter accepts what it did (an
i32widens intoisizeimplicitly) and every narrowing left is a cast that was there before. Gate running; battery next.