Test cfg-gated contracttrait override methods - #1993
Merged
Conversation
leighmcculloch
marked this pull request as ready for review
August 6, 2026 09:04
leighmcculloch
enabled auto-merge
August 6, 2026 09:04
Contributor
|
semver:patch — all changes are confined to
Nothing was unclear about this classification. This classification is advisory; the author and reviewer decide the release type.
|
mootz12
approved these changes
Aug 7, 2026
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.
What
Extend
tests/attributeswith regression coverage for three#[cfg]shapes on#[contractimpl(contracttrait)]override methods that no test exercised: stacked cfgs that are all true, thecfg(not(...))form, and multiple mutually exclusive cfg-gated overrides of the same trait function.Why
Review feedback on #1760 flagged cfg on trait override methods as an area with unresolved edge cases, and investigation found current main already handles every shape correctly since #1871 — but the multi-override path in
derive_contractimpl_trait_default_fns_not_overriddenhad no test at all, and a deliberate mutation of that loop still passed the suite before this change.Known limitations
N/A
SemVer Change
vX._._) - Breaking change to the public API.v_.Y._) - Additive change to the public API.v_._.Z) - No change to the public API.