Repository navigation
Move decimal-byte-parts kernel logic out of dispatch macros - #11528
Merged
Merged
Conversation
cargo-mutants does not mutate code inside macro invocations, so logic written in a match_each_* macro body is never mutation tested. Keep the macro calls as thin type dispatch and move the logic into generic functions that cargo-mutants can mutate: - assemble: the match on the number of lower parts, which picks the i128/i256 storage width and zips the u64 parts into rows, moves from the match_each_signed_integer_ptype! body into assemble_wide_decimal_array. - compare: the narrowing conversion of a decimal value to the MSP type, with its overflow direction checks, moves from the match_each_decimal_value! body into native_decimal_to_primitive. Behavior is unchanged and the helpers monomorphize as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
joseph-isaacs
enabled auto-merge (squash)
November 17, 2026 13:27
Contributor
Author
|
CI status: the failing "Integration smoke tests" job fails on Generated by Claude Code |
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
robert3005
approved these changes
Nov 17, 2026
connortsui20
added a commit
that referenced
this pull request
Nov 18, 2026
`cargo-mutants` skips macro bodies, so it cannot mutate predicates and loops inside type dispatch. Generic helpers make that logic available to mutation testing and preserve static dispatch. This follows the approach in #11528 and #11532. This change was prepared with assistance from Codex. --------- Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
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.
cargo-mutants can't mutate code inside macros, so logic in decimal-byte-parts'
match_each_*!bodies was never mutation tested. This moves the wide-decimal assembly and the decimal-to-primitive overflow check into genericassemble_wide_decimal_arrayandnative_decimal_to_primitive.🤖 Generated with Claude Code
https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM