Skip to content

Commit 93130c0

Browse files
committed
Add matches! test case for issue 5709
1 parent 9e37c1e commit 93130c0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/source/issue_5709.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// rustfmt-version: Two
2+
3+
fn is_something(foo: Foo, bar: Bar) -> bool {
4+
matches!((legacy_required_finality, signature_weight),
5+
| (LegacyRequiredFinality::Any, Insufficient | Weak | Strict)
6+
| (LegacyRequiredFinality::Weak, Weak | Strict)
7+
| (LegacyRequiredFinality::Strict, Strict)
8+
)
9+
}

tests/target/issue_5709.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// rustfmt-version: Two
2+
3+
fn is_something(foo: Foo, bar: Bar) -> bool {
4+
matches!(
5+
(legacy_required_finality, signature_weight),
6+
(LegacyRequiredFinality::Any, Insufficient | Weak | Strict)
7+
| (LegacyRequiredFinality::Weak, Weak | Strict)
8+
| (LegacyRequiredFinality::Strict, Strict)
9+
)
10+
}

0 commit comments

Comments
 (0)