Closed
Description
In a rust-lang/rust PR, I saw some pretty strange formatting of pattern matching with @
, |
, and parens patterns: https://github.com/rust-lang/rust/pull/70906/files#r405165086
The diff was:
- category: category @ ConstraintCategory::Return,
+ category:
+ category
+ @
+ (ConstraintCategory::Return
+ | ConstraintCategory::CallArgument
+ | ConstraintCategory::OpaqueType),
which seems odd because it is putting @
on its own line and doing (
on the same line as a pattern and then )
also on the same line as a pattern.
I would have expected:
- category: category @ ConstraintCategory::Return,
+ category: category @ (
+ ConstraintCategory::Return
+ | ConstraintCategory::CallArgument
+ | ConstraintCategory::OpaqueType
+ ),