-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
It is now possible in Rust to start a match arm with a |
, e.g.,
match foo {
| whatever => {}
}
Currently Rustfmt treats a leading |
or not as significant code, i.e., preserves what the user chose to do. However, it is not semantically significant, so one might consider it a style issue, in which case Rustfmt should change it one way or the other (since we believe in consistent formatting, not preserving user input). As a counter-point, we do not strip unnecessary ()
although these also are not semantically significant.
So, there are three options:
- never use an initial
|
- always use an intial
|
- preserve the user choice.
Metadata
Metadata
Assignees
Labels
No labels