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 comment
|
||||||
t => 1,
|
t => 1,
|
||||||
u => 2,
|
u => 2,
|
||||||
// TODO uncomment when block-support exists
|
v => {
|
||||||
// v => {
|
} /* funky block
|
||||||
// } /* funky block
|
* comment */
|
||||||
// * comment */
|
|
||||||
// final 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 some_var
|
||||||
{ // match comment
|
{
|
||||||
|
// match comment
|
||||||
pattern0 => val0,
|
pattern0 => val0,
|
||||||
pattern1 => val1,
|
pattern1 => val1,
|
||||||
pattern2 | pattern3 =>
|
pattern2 | pattern3 =>
|
||||||
|
|
|
@ -34,7 +34,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match some_var { // match comment
|
match some_var {
|
||||||
|
// match comment
|
||||||
pattern0 => val0,
|
pattern0 => val0,
|
||||||
pattern1 => val1,
|
pattern1 => val1,
|
||||||
pattern2 | pattern3 => {
|
pattern2 | pattern3 => {
|
||||||
|
|
|
@ -128,13 +128,15 @@ fn issue339() {
|
||||||
h => {
|
h => {
|
||||||
// comment above block
|
// comment above block
|
||||||
}
|
}
|
||||||
i => {} // comment below block
|
i => {}
|
||||||
|
// comment below block
|
||||||
j => {
|
j => {
|
||||||
// comment inside block
|
// comment inside block
|
||||||
}
|
}
|
||||||
j2 => {
|
j2 => {
|
||||||
// comments inside...
|
// comments inside...
|
||||||
} // ... and after
|
}
|
||||||
|
// ... and after
|
||||||
// TODO uncomment when vertical whitespace is handled better
|
// TODO uncomment when vertical whitespace is handled better
|
||||||
// k => {
|
// k => {
|
||||||
//
|
//
|
||||||
|
@ -156,11 +158,9 @@ fn issue339() {
|
||||||
// t comment
|
// t comment
|
||||||
t => 1,
|
t => 1,
|
||||||
u => 2,
|
u => 2,
|
||||||
// TODO uncomment when block-support exists
|
v => {} /* funky block
|
||||||
// v => {
|
* comment */
|
||||||
// } /* funky block
|
/* final comment */
|
||||||
// * comment */
|
|
||||||
// final comment
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,8 +173,8 @@ fn issue355() {
|
||||||
e => vec![1, 2],
|
e => vec![1, 2],
|
||||||
f => vec![3; 4],
|
f => vec![3; 4],
|
||||||
h => println!("a", b), // h comment
|
h => println!("a", b), // h comment
|
||||||
i => vec![1, 2], // i comment
|
i => vec![1, 2], // i comment
|
||||||
j => vec![3; 4], // j comment
|
j => vec![3; 4], // j comment
|
||||||
// k comment
|
// k comment
|
||||||
k => println!("a", b),
|
k => println!("a", b),
|
||||||
// l comment
|
// l comment
|
||||||
|
@ -213,11 +213,11 @@ fn issue355() {
|
||||||
y => vec![3; 4],
|
y => vec![3; 4],
|
||||||
// Brackets with comments
|
// Brackets with comments
|
||||||
tc => println!{"a", b}, // comment
|
tc => println!{"a", b}, // comment
|
||||||
uc => vec![1, 2], // comment
|
uc => vec![1, 2], // comment
|
||||||
vc => vec![3; 4], // comment
|
vc => vec![3; 4], // comment
|
||||||
wc => println!["a", b], // comment
|
wc => println!["a", b], // comment
|
||||||
xc => vec![1, 2], // comment
|
xc => vec![1, 2], // comment
|
||||||
yc => vec![3; 4], // comment
|
yc => vec![3; 4], // comment
|
||||||
yd => looooooooooooooooooooooooooooooooooooooooooooooooooooooooong_func(
|
yd => looooooooooooooooooooooooooooooooooooooooooooooooooooooooong_func(
|
||||||
aaaaaaaaaa,
|
aaaaaaaaaa,
|
||||||
bbbbbbbbbb,
|
bbbbbbbbbb,
|
||||||
|
|
Loading…
Reference in a new issue