Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't drop opening brace on long line matches. (#1228)
* Don't drop opening brace on long line matches. Fixes #1225 * Added a test case for long match arms with braces on newline.
- Loading branch information
1 parent
6bf1382
commit 56469a8
Showing
3 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// rustfmt-max_width: 80 | ||
// rustfmt-control_brace_style: AlwaysNextLine | ||
|
||
fn main() { | ||
match x { | ||
aaaaaaaa::Bbbbb::Ccccccccccccc(_, Some(ref x)) if x == | ||
"aaaaaaaaaaa \ | ||
aaaaaaa \ | ||
aaaaaa" => { | ||
Ok(()) | ||
} | ||
_ => Err(x), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// rustfmt-max_width: 80 | ||
// rustfmt-control_brace_style: AlwaysNextLine | ||
|
||
fn main() { | ||
match x | ||
{ | ||
aaaaaaaa::Bbbbb::Ccccccccccccc(_, Some(ref x)) if x == | ||
"aaaaaaaaaaa \ | ||
aaaaaaa aaaaaa" => | ||
{ | ||
Ok(()) | ||
} | ||
_ => Err(x), | ||
} | ||
} |