Skip to content

Commit 8a0e645

Browse files
committed
Merge rust-bitcoin#4411: Mutation testing: Add exclusions for match arm/guard mutants
3bcb5b0 Add exclusions for match arm/guard mutants (Jamil Lambert, PhD) Pull request description: cargo-mutants 25.0.1 introduced a new mutation pattern that deletes an arm of a match statement or replaces a match guard with true and false. These are applied in sections that have been excluded from mutation testing and cause false positives. The match patterns are also now stricter causing previously excluded `impl` to be included. Exclude the new match arm and guard mutation patterns. Add `impl fmt::` versions for Debug and Display. Closes rust-bitcoin#4402 ACKs for top commit: apoelstra: ACK 3bcb5b0; successfully ran local tests tcharding: ACK 3bcb5b0 Tree-SHA512: d7a45bdd5bc844c273956922b5483c70f24ca8ea20da275fd6b1ff13e71ec86fcc487932365beb3084cc3894bbe1317ddb3df975f90584b639187ba278b0721e
2 parents ee03704 + 3bcb5b0 commit 8a0e645

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.cargo/mutants.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ exclude_globs = [
44
"units/src/amount/verification.rs" # kani tests
55
]
66
exclude_re = [
7-
"impl Debug",
87
"impl Arbitrary",
8+
"impl Debug",
9+
"impl fmt::Debug",
910
"impl Display",
11+
"impl fmt::Display",
1012
".*Error",
1113
"deserialize", # Skip serde mutation tests
1214
"Iterator", # Mutating operations in an iterator can result in an infinite loop
15+
"match arm", "match guard", # New addition in cargo-mutants 25.0.1 deletes match arms and replaces match guards even in excluded functions
1316

1417
# ----------------------------------Crate-specific exclusions----------------------------------
1518
# Units

0 commit comments

Comments
 (0)