Update tests
This commit is contained in:
parent
63ac49638b
commit
5cf05a2992
|
@ -0,0 +1,9 @@
|
|||
// rustfmt-match_pattern_separator_break_point: Front
|
||||
// Whether `|` goes to front or to back.
|
||||
|
||||
fn main() {
|
||||
match lorem {
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | cccccccccccccccccccccccccccccccccccccccc | dddddddddddddddddddddddddddddddddddddddd => (),
|
||||
_ => (),
|
||||
}
|
||||
}
|
|
@ -159,10 +159,9 @@ fn issue339() {
|
|||
// t comment
|
||||
t => 1,
|
||||
u => 2,
|
||||
// TODO uncomment when block-support exists
|
||||
// v => {
|
||||
// } /* funky block
|
||||
// * comment */
|
||||
v => {
|
||||
} /* funky block
|
||||
* comment */
|
||||
// final comment
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// rustfmt-match_pattern_separator_break_point: Front
|
||||
// Whether `|` goes to front or to back.
|
||||
|
||||
fn main() {
|
||||
match lorem {
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
| cccccccccccccccccccccccccccccccccccccccc
|
||||
| dddddddddddddddddddddddddddddddddddddddd => (),
|
||||
_ => (),
|
||||
}
|
||||
}
|
|
@ -41,7 +41,8 @@ fn main() {
|
|||
}
|
||||
|
||||
match some_var
|
||||
{ // match comment
|
||||
{
|
||||
// match comment
|
||||
pattern0 => val0,
|
||||
pattern1 => val1,
|
||||
pattern2 | pattern3 =>
|
||||
|
|
|
@ -34,7 +34,8 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
match some_var { // match comment
|
||||
match some_var {
|
||||
// match comment
|
||||
pattern0 => val0,
|
||||
pattern1 => val1,
|
||||
pattern2 | pattern3 => {
|
||||
|
|
|
@ -128,13 +128,15 @@ fn issue339() {
|
|||
h => {
|
||||
// comment above block
|
||||
}
|
||||
i => {} // comment below block
|
||||
i => {}
|
||||
// comment below block
|
||||
j => {
|
||||
// comment inside block
|
||||
}
|
||||
j2 => {
|
||||
// comments inside...
|
||||
} // ... and after
|
||||
}
|
||||
// ... and after
|
||||
// TODO uncomment when vertical whitespace is handled better
|
||||
// k => {
|
||||
//
|
||||
|
@ -156,11 +158,9 @@ fn issue339() {
|
|||
// t comment
|
||||
t => 1,
|
||||
u => 2,
|
||||
// TODO uncomment when block-support exists
|
||||
// v => {
|
||||
// } /* funky block
|
||||
// * comment */
|
||||
// final comment
|
||||
v => {} /* funky block
|
||||
* comment */
|
||||
/* final comment */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,8 +173,8 @@ fn issue355() {
|
|||
e => vec![1, 2],
|
||||
f => vec![3; 4],
|
||||
h => println!("a", b), // h comment
|
||||
i => vec![1, 2], // i comment
|
||||
j => vec![3; 4], // j comment
|
||||
i => vec![1, 2], // i comment
|
||||
j => vec![3; 4], // j comment
|
||||
// k comment
|
||||
k => println!("a", b),
|
||||
// l comment
|
||||
|
@ -213,11 +213,11 @@ fn issue355() {
|
|||
y => vec![3; 4],
|
||||
// Brackets with comments
|
||||
tc => println!{"a", b}, // comment
|
||||
uc => vec![1, 2], // comment
|
||||
vc => vec![3; 4], // comment
|
||||
uc => vec![1, 2], // comment
|
||||
vc => vec![3; 4], // comment
|
||||
wc => println!["a", b], // comment
|
||||
xc => vec![1, 2], // comment
|
||||
yc => vec![3; 4], // comment
|
||||
xc => vec![1, 2], // comment
|
||||
yc => vec![3; 4], // comment
|
||||
yd => looooooooooooooooooooooooooooooooooooooooooooooooooooooooong_func(
|
||||
aaaaaaaaaa,
|
||||
bbbbbbbbbb,
|
||||
|
|
Loading…
Reference in a new issue