Repository navigation
quest: plan NonZero's unchecked arithmetic - #629
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head 28219a6 against base 2b10b3a.
No actionable findings in this two-file planning-only change. The new quest is linked from the unsafe epic and scopes the remaining NonZero operations separately. In the inspected Rust source, unchecked_add and unchecked_mul are nonzero_ops methods without track_caller and delegate to the primitive unchecked arithmetic, consistent with the plan to use a std source location rather than the consumer call site.
Direction: when implementing, pin valid boundary results and the configured native precondition-abort text/location in differential tests, including signed multiplication overflow and the supported unsigned addition widths. Invalid unsafe inputs are not guaranteed to abort in every Rust build configuration; match the project's pinned validation configuration rather than treating that behavior as a universal Rust guarantee.
Limits: GitHub-only static review of the complete diff, caller-site infrastructure and Rust source. No translator changes land here. I did not run quest validation, compilation, differential tests or native abort cases, and did not verify the claimed absence of consumers at the moq pin. This COMMENT is not merge approval.
|
No actionable comments were generated in the recent review. WalkthroughThe change adds a required item for translating Merge Risk:
|

Plans
NonZero::unchecked_addandNonZero::unchecked_mulas an XS quest in m3'sts-unsafeepic. moq-dev/rust2#622 translates the integers'unchecked_*and leaves these two refused by name.Both are unstable (
nonzero_ops) and not#[track_caller], so the plan says a violated precondition aborts at std's site, throughcaller.rs'sSITES, rather than at the call.Decided with the maintainer on 2026-11-07: m3, in this epic. No consumer at the moq pin.
Validation:
quest checkpasses (51 documents).(Written by Claude Opus 5.5 with high effort)
🤖 Generated with Claude Code