Closed
Description
See how in the following, all the |
bars are mostly aligned except the last one:
#![allow(dead_code)]
use E::*;
enum E {
A,
B,
C,
D,
}
fn main() {
match A {
A |
B |
C |
D => (),
}
}
I'd propose it be allowed at the beginning of the pattern as well enabling something like this:
#![allow(dead_code)]
use E::*;
enum E {
A,
B,
C,
D,
}
fn main() {
match A {
| A
| B
| C
| D => (),
}
}
This appears to be the official style for F# matches and it has grown on me a lot. It highlights the matches and doesn't require as much deeper nesting. After getting used to the F# style, the inability to do this is rust seems a bit limiting.
I'm not sure if this issue should be in this repo or not but just direct me if I have to move it.
Metadata
Metadata
Assignees
Labels
No labels