Skip to content

Commit 00441b3

Browse files
committed
add tests with type_punctuation_density set to Compressed and a list of types spanning multiple lines
1 parent dd80808 commit 00441b3

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

tests/source/types_compressed.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// rustfmt-type_punctuation_density: Compressed
2+
3+
pub fn do_something<'a, T: Trait1 + Trait2 + 'a>(
4+
&fooo: u32,
5+
) -> impl Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + Foo + 'a + 'a + 'a + 'a + 'a
6+
{
7+
}

tests/target/types_compressed.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// rustfmt-type_punctuation_density: Compressed
2+
3+
pub fn do_something<'a, T: Trait1+Trait2+'a>(
4+
&fooo: u32,
5+
) -> impl Foo
6+
+Foo
7+
+Foo
8+
+Foo
9+
+Foo
10+
+Foo
11+
+Foo
12+
+Foo
13+
+Foo
14+
+Foo
15+
+Foo
16+
+Foo
17+
+Foo
18+
+Foo
19+
+Foo
20+
+Foo
21+
+Foo
22+
+Foo
23+
+Foo
24+
+Foo
25+
+Foo
26+
+Foo
27+
+Foo
28+
+Foo
29+
+Foo
30+
+Foo
31+
+Foo
32+
+Foo
33+
+Foo
34+
+Foo
35+
+Foo
36+
+Foo
37+
+Foo
38+
+Foo
39+
+Foo
40+
+Foo
41+
+Foo
42+
+Foo
43+
+'a+'a+'a+'a+'a {
44+
}

0 commit comments

Comments
 (0)