Open
Description
When formatting this code:
fn is_something(foo: Foo, bar: Bar) -> bool {
matches!((legacy_required_finality, signature_weight),
| (LegacyRequiredFinality::Any, Insufficient | Weak | Strict)
| (LegacyRequiredFinality::Weak, Weak | Strict)
| (LegacyRequiredFinality::Strict, Strict)
)
}
It is written like that:
fn is_something(foo: Foo, bar: Bar) -> bool {
matches!((legacy_required_finality, signature_weight), |(
LegacyRequiredFinality::Any,
Insufficient | Weak | Strict,
)| (
LegacyRequiredFinality::Weak,
Weak | Strict
) | (
LegacyRequiredFinality::Strict,
Strict
))
}
I think that rustfmt sees it as a closure.
I tried to reproduce with a simpler example, but it doesn't work. I think it comes from diverse things, like the fact there is a tuple.